class SidekiqUniqueJobs::Locksmith
def primed_async(conn)
-
(Object)
- whatever the block returns when lock was acquired -
(nil)
- when lock was not possible
Parameters:
-
conn
(Redis
) -- a redis connection
Other tags:
- Note: - Used for runtime locks to avoid problems with blocking commands
def primed_async(conn) return yield if Concurrent::Promises .future(conn) { |red_con| pop_queued(red_con) } .value(drift(config.ttl)) warn_about_timeout end