Sha256: febc522410ec63ec3f1171cac7848fe65d8341d6ed127ee2f739a29d4f987b67
Contents?: true
Size: 549 Bytes
Versions: 7
Compression:
Stored size: 549 Bytes
Contents
class ScheduleJobToRemoveOldPromises < ActiveRecord::Migration[4.2] def up cron_every_hour = '0 * * * *' schedule = Marty::BackgroundJob::Schedule.new( job_class: 'Marty::RemoveOldPromisesJob', cron: cron_every_hour, state: 'on' ) # Since we add `arguments` column to the model in later migrations, # we should skip it's validation here schedule.save!(validate: false) end def down Marty::BackgroundJob::Schedule.find_by( job_class: 'Marty::RemoveOldPromisesJob' )&.destroy end end
Version data entries
7 entries across 7 versions & 1 rubygems