about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2021-06-08 09:28:57 -0500
committerStarfall <us@starfall.systems>2021-06-08 09:28:57 -0500
commitf95637178671b1aa0648fa506231717229a6cd8f (patch)
treefbaa725bcdb88220c5d1e299b338b196822460e5 /app/lib
parent2c6fcb9cf8fbb09e900fc3625837529155f98f4f (diff)
parentdb5baf3d1a93cbf6961f721205cff0beaf71bffd (diff)
Merge branch 'glitch'
Conflicts:
	yarn.lock: caniuse-lite has been outdated in upstream for
	awhile, and we fixed it a few weeks ago in our fork
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/activitypub/activity.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity.rb b/app/lib/activitypub/activity.rb
index 3baee4ca4..d2ec122a4 100644
--- a/app/lib/activitypub/activity.rb
+++ b/app/lib/activitypub/activity.rb
@@ -216,8 +216,8 @@ class ActivityPub::Activity
     redis.del(key)
   end
 
-  def lock_or_fail(key)
-    RedisLock.acquire({ redis: Redis.current, key: key }) do |lock|
+  def lock_or_fail(key, expire_after = 15.minutes.seconds)
+    RedisLock.acquire({ redis: Redis.current, key: key, autorelease: expire_after }) do |lock|
       if lock.acquired?
         yield
       else