From b209b0ca5759d712dff7a3ffa3cbe2778f629049 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 23 May 2019 14:03:42 +0200 Subject: [PATCH] Delay search index background jobs on error. --- app/jobs/search_index_job.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/jobs/search_index_job.rb b/app/jobs/search_index_job.rb index 96e3c2c64..ea5e358e1 100644 --- a/app/jobs/search_index_job.rb +++ b/app/jobs/search_index_job.rb @@ -1,6 +1,8 @@ class SearchIndexJob < ApplicationJob - retry_on StandardError, attempts: 20 + retry_on StandardError, attempts: 20, wait: lambda { |executions| + executions * 10.seconds + } def perform(object, o_id) @object = object