We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b1ed5a commit e50450eCopy full SHA for e50450e
lib/with_advisory_lock/mysql.rb
@@ -15,6 +15,10 @@ def release_lock
15
execute_successful?("RELEASE_LOCK(#{quoted_lock_str})")
16
end
17
18
+ def release_all_locks
19
+ execute_query("RELEASE_ALL_LOCKS()")
20
+ end
21
+
22
def execute_successful?(mysql_function)
23
execute_query(mysql_function) == 1
24
lib/with_advisory_lock/postgresql.rb
@@ -29,6 +29,10 @@ def release_lock
29
30
31
32
33
+ connection.execute("SELECT pg_advisory_unlock_all()")
34
35
36
def advisory_try_lock_function(transaction_scope)
37
[
38
'pg_try_advisory',
0 commit comments