Skip to content

Commit

Permalink
Merge pull request #42305 from nextcloud/fix/reset-last-run-joblist
Browse files Browse the repository at this point in the history
fix(joblist): also reset last_run timestamp on updating an existing job
  • Loading branch information
nickvergessen authored Dec 15, 2023
2 parents 8aa91a1 + dc87c53 commit a29b0b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/BackgroundJob/JobList.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function add($job, $argument = null, int $firstCheck = null): void {
$query->update('jobs')
->set('reserved_at', $query->expr()->literal(0, IQueryBuilder::PARAM_INT))
->set('last_checked', $query->createNamedParameter($firstCheck, IQueryBuilder::PARAM_INT))
->set('last_run', $query->createNamedParameter(0, IQueryBuilder::PARAM_INT))
->where($query->expr()->eq('class', $query->createNamedParameter($class)))
->andWhere($query->expr()->eq('argument_hash', $query->createNamedParameter(md5($argumentJson))));
}
Expand Down

0 comments on commit a29b0b4

Please sign in to comment.