Skip to content

Commit

Permalink
Fix concurrency in Pg::unlock
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-suse committed Dec 16, 2019
1 parent bb02acf commit 770c173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Minion/Backend/Pg.pm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ sub unlock {
!!shift->pg->db->query(
'delete from minion_locks where id = (
select id from minion_locks
where expires > now() and name = ? order by expires limit 1
where expires > now() and name = ? order by expires limit 1 for update
) returning 1', shift
)->rows;
}
Expand Down

0 comments on commit 770c173

Please sign in to comment.