If a bulk update job fails, don't automatically retry it. Retrying it will clobber the original error message if it fails again.
17 lines
395 B
Ruby
17 lines
395 B
Ruby
# A job that exports a database table to Google Cloud Storage and to Google
|
|
# BigQuery. Spawned daily by {DanbooruMaintenance}.
|
|
#
|
|
# @see BigqueryExportService
|
|
class BigqueryExportJob < ApplicationJob
|
|
retry_on Exception, attempts: 0
|
|
|
|
# XXX delayed_job specific
|
|
def max_attempts
|
|
1
|
|
end
|
|
|
|
def perform(model:, **options)
|
|
BigqueryExportService.new(model, **options).export!
|
|
end
|
|
end
|