Fix autofail cron

This commit is contained in:
Lukáš Plevač 2023-12-29 09:02:10 +00:00
parent 4cfce6e23a
commit 1a0c9b0b9b

View File

@ -43,9 +43,9 @@
$observations = new \wsos\database\core\table(\DAL\observation::class);
$ob = new \DAL\observation();
$faild = $observations->query("status==? && start<?", [$ob->status->getVal("assigned"), time() - 300]);
$faild = $observations->query("(status == ?) && (start < ?)", [$ob->status->getVal("assigned"), time() - 300]);
foreach ($fob in $faild->values) {
foreach ($faild->values as $fob) {
$fob->status->set("fail");
$fob->commit();
}