mjda
Well-known member
So I've built a rebuild job to rebuild some data from a custom add-on.
I've got this in my Job.php:
However, for some reason, it's skipping over some of the items in the database. I've confirmed that's the case by doing this in my Job.php:
I have confirmed that there is an item with item_id 19142 in the database. However, the script is never stopped with that ID. It stops just fine when I put other IDs in that code, but not with that one (and several others).
Any ideas?
I've got this in my Job.php:
PHP:
protected function getNextIds($start, $batch)
{
$db = $this->app->db();
return $db->fetchAllColumn($db->limit(
"
SELECT item_id
FROM custom_table
WHERE item_id > ?
ORDER BY item_id
", $batch
), $start);
}
However, for some reason, it's skipping over some of the items in the database. I've confirmed that's the case by doing this in my Job.php:
PHP:
protected function rebuildById($id)
{
if ($id == 19142)
{
echo 'stopped';
exit;
}
}
I have confirmed that there is an item with item_id 19142 in the database. However, the script is never stopped with that ID. It stops just fine when I put other IDs in that code, but not with that one (and several others).
Any ideas?