You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
346 B
14 lines
346 B
# app/jobs/daily_dump_job.rb
|
|
class DailyDumpJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
def perform
|
|
zip_path = DumpService.perform
|
|
if zip_path
|
|
DumpMailer.daily_dump(zip_path).deliver_now
|
|
File.delete(zip_path) if File.exist?(zip_path)
|
|
else
|
|
Rails.logger.error "[DailyDumpJob] Dump fehlgeschlagen."
|
|
end
|
|
end
|
|
end
|