MDL-74775 adhoc_task: Do not clear the timecreated of failed tasks
This commit is contained in:
@@ -242,6 +242,8 @@ class manager {
|
||||
|
||||
// Check if the task is allowed to be retried or not.
|
||||
$record->attemptsavailable = $task->retry_until_success() ? self::MAX_RETRY : 1;
|
||||
// Set the time the task was created.
|
||||
$record->timecreated = time();
|
||||
|
||||
// Check if the same task is already scheduled.
|
||||
if ($checkforexisting && self::task_is_scheduled($task)) {
|
||||
@@ -321,7 +323,6 @@ class manager {
|
||||
$record->faildelay = $task->get_fail_delay();
|
||||
$record->customdata = $task->get_custom_data_as_string();
|
||||
$record->userid = $task->get_userid();
|
||||
$record->timecreated = time();
|
||||
$record->timestarted = $task->get_timestarted();
|
||||
$record->hostname = $task->get_hostname();
|
||||
$record->pid = $task->get_pid();
|
||||
|
||||
Reference in New Issue
Block a user