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.
 
 
 
 
 
 

28 lines
910 B

# config/initializers/good_job.rb
Rails.application.configure do
config.active_job.queue_adapter = :good_job
config.good_job = {
execution_mode: :async, # läuft im Web-Prozess (kein extra Worker nötig)
queues: "*",
max_threads: 2, # reicht für 2 Jobs locker
preserve_job_records: true, # wichtig für Cron-Unique-Mechanik
enable_cron: true,
cron_graceful_restart_period: 5.minutes, # nach Deploy kurz "nachziehen"
cron: {
daily_dump: {
cron: "0 2 * * * Europe/Vienna",
class: "DailyDumpJob",
description: "Täglichen Dump-Versand starten"
},
training_watch: {
cron: "0 0 * * * Europe/Vienna",
class: "TrainingWatch",
description: "TrainingWatch starten"
}
}
}
# deprecation warning sauber fixen/silencen (wie in deiner Logmeldung)
#config.good_job.smaller_number_is_higher_priority = false
end