Skip to content

Commit

Permalink
Revert "Remove unnecessary lastStartTime reset"
Browse files Browse the repository at this point in the history
This reverts commit d90843d.
  • Loading branch information
marcoslot committed Aug 9, 2024
1 parent 14bfd0b commit 9490f9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pg_cron.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,8 @@ ManageCronTask(CronTask *task, TimestampTz currentTime)
break;
}

task->lastStartTime = GetCurrentTimestamp();

if (CronLogRun)
UpdateJobRunDetail(task->runId, &pid, GetCronStatus(CRON_STATUS_RUNNING), NULL, &task->lastStartTime, NULL);

Expand Down Expand Up @@ -1655,6 +1657,7 @@ ManageCronTask(CronTask *task, TimestampTz currentTime)
task->startDeadline = 0;
task->state = CRON_TASK_RUNNING;

task->lastStartTime = GetCurrentTimestamp();
if (CronLogRun)
UpdateJobRunDetail(task->runId, NULL, GetCronStatus(CRON_STATUS_RUNNING), NULL, &task->lastStartTime, NULL);
}
Expand Down

0 comments on commit 9490f9c

Please sign in to comment.