Skip to content

Commit

Permalink
fix(joblist): also reset last_run timestamp on updating an existing job
Browse files Browse the repository at this point in the history
Signed-off-by: Anna Larch <anna@nextcloud.com>
  • Loading branch information
miaulalala committed Dec 15, 2023
1 parent 1db6947 commit dc87c53
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 dc87c53

Please sign in to comment.