mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
The ActionController options were not set in testing nor Sidekiq jobs. The now used config is always set in config/application.rb.
18 lines
489 B
Ruby
18 lines
489 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Rails standard class for common job code.
|
|
class ApplicationJob < ActiveJob::Base
|
|
# Automatically retry jobs that encountered a deadlock
|
|
# retry_on ActiveRecord::Deadlocked
|
|
|
|
# Most jobs are safe to ignore if the underlying records are no longer available
|
|
# discard_on ActiveJob::DeserializationError
|
|
|
|
private
|
|
|
|
def enable_active_storage_urls
|
|
ActiveStorage::Current.url_options ||=
|
|
Rails.application.routes.default_url_options
|
|
end
|
|
end
|