A platform for community discussion. Free, open, simple.
FIX: hold s3 related distributed locks longer
Sam Saffrone53a17191621
diff --git a/app/models/post.rb b/app/models/post.rbindex f9f565d6683..3cbe11e6737 100644--- a/app/models/post.rb+++ b/app/models/post.rb@@ -927,7 +927,7 @@ class Post < ActiveRecord::Basemissing_post_uploads = {}count = 0- DistributedMutex.synchronize("find_missing_uploads") do+ DistributedMutex.synchronize("find_missing_uploads", validity: 30.minutes) doPostCustomField.where(name: Post::MISSING_UPLOADS).delete_allquery = Post.have_uploadsdiff --git a/lib/s3_inventory.rb b/lib/s3_inventory.rbindex ebe40fddf11..b69f4a0e719 100644--- a/lib/s3_inventory.rb+++ b/lib/s3_inventory.rb@@ -30,7 +30,7 @@ class S3Inventoryreturnend- DistributedMutex.synchronize("s3_inventory_list_missing_#{type}") do+ DistributedMutex.synchronize("s3_inventory_list_missing_#{type}", validity: 30.minutes) dobeginfiles.each do |file|next if File.exists?(file[:filename][0...-3])