From 76bb01c31cde4c7d6ad59bf6ab536cbe5c4e2bb9 Mon Sep 17 00:00:00 2001 From: Daniel Waterworth Date: Fri, 3 Apr 2020 13:29:42 +0100 Subject: [PATCH] DEV: Increase process_post lock timeout The process_post job uses CookedPostProcessor which also uses a DistributedMutex. There's no good reason for the timeout of the outer lock to be smaller than the timeout of the inner lock. --- app/jobs/regular/process_post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/regular/process_post.rb b/app/jobs/regular/process_post.rb index 8dd7487f369..b13d69d61d8 100644 --- a/app/jobs/regular/process_post.rb +++ b/app/jobs/regular/process_post.rb @@ -7,7 +7,7 @@ module Jobs class ProcessPost < ::Jobs::Base def execute(args) - DistributedMutex.synchronize("process_post_#{args[:post_id]}") do + DistributedMutex.synchronize("process_post_#{args[:post_id]}", validity: 10.minutes) do post = Post.find_by(id: args[:post_id]) # two levels of deletion return unless post.present? && post.topic.present?