Delay search index background jobs on error.

This commit is contained in:
Martin Edenhofer 2019-05-23 14:03:42 +02:00 committed by Thorsten Eckel
parent 049adbe469
commit b209b0ca57

View file

@ -1,6 +1,8 @@
class SearchIndexJob < ApplicationJob class SearchIndexJob < ApplicationJob
retry_on StandardError, attempts: 20 retry_on StandardError, attempts: 20, wait: lambda { |executions|
executions * 10.seconds
}
def perform(object, o_id) def perform(object, o_id)
@object = object @object = object