Skip to content

Commit

Permalink
Merge pull request #31403 from nextcloud/backport/31398/stable22
Browse files Browse the repository at this point in the history
[stable22] Also use hashed/indexed column on delete
  • Loading branch information
nickvergessen authored Mar 2, 2022
2 parents 721f4d8 + 1831c5c commit 5b0bbb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/BackgroundJob/JobList.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ public function remove($job, $argument = null) {
$query->delete('jobs')
->where($query->expr()->eq('class', $query->createNamedParameter($class)));
if (!is_null($argument)) {
$argument = json_encode($argument);
$query->andWhere($query->expr()->eq('argument', $query->createNamedParameter($argument)));
$argumentJson = json_encode($argument);
$query->andWhere($query->expr()->eq('argument_hash', $query->createNamedParameter(md5($argumentJson))));
}
$query->execute();
}
Expand Down

0 comments on commit 5b0bbb5

Please sign in to comment.