MDL-80749 adhoc_task: Log the first starting time of the task
This commit is contained in:
@@ -1227,6 +1227,13 @@ class manager {
|
||||
$task->set_pid($pid);
|
||||
|
||||
$record = self::record_from_adhoc_task($task);
|
||||
|
||||
// If this is the first time the task has been started, then set the first starting time.
|
||||
$firststartingtime = $DB->get_field('task_adhoc', 'firststartingtime', ['id' => $record->id]);
|
||||
if (is_null($firststartingtime)) {
|
||||
$record->firststartingtime = $time;
|
||||
}
|
||||
|
||||
$DB->update_record('task_adhoc', $record);
|
||||
|
||||
self::task_starting($task);
|
||||
|
||||
Reference in New Issue
Block a user