Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 877... Línea 877...
877
                continue;
877
                continue;
878
            }
878
            }
Línea 879... Línea 879...
879
 
879
 
Línea 880... Línea 880...
880
            if ($lock = $cronlockfactory->get_lock('adhoc_' . $record->id, 0)) {
880
            if ($lock = $cronlockfactory->get_lock('adhoc_' . $record->id, 0)) {
-
 
881
 
881
 
882
                // Safety check, see if the task has already been processed by another cron run (or attempted and failed).
-
 
883
                // If another cron run attempted to process the task and failed, nextruntime will be in the future.
-
 
884
                $record = $DB->get_record_select('task_adhoc',
882
                // Safety check, see if the task has been already processed by another cron run.
885
                    "id = :id AND nextruntime < :timestart",
883
                $record = $DB->get_record('task_adhoc', array('id' => $record->id));
886
                    ['id' => $record->id, 'timestart' => $timestart]);
884
                if (!$record) {
887
                if (!$record) {
885
                    $lock->release();
888
                    $lock->release();
886
                    unset(self::$miniqueue[$taskid]);
889
                    unset(self::$miniqueue[$taskid]);