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 <[email protected]>
  • Loading branch information
miaulalala authored and backportbot-nextcloud[bot] committed Dec 15, 2023
1 parent 01fad10 commit a19465f
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 a19465f

Please sign in to comment.