Module: Schedulable

Extended by:
ActiveSupport::Concern
Included in:
ContainerExpirationPolicy, CronSchedulable, Packages::Cleanup::Policy
Defined in:
app/models/concerns/schedulable.rb

Instance Method Summary collapse

Instance Method Details

#schedule_next_run!Object


12
13
14
15
16
# File 'app/models/concerns/schedulable.rb', line 12

def schedule_next_run!
  save! # with set_next_run_at
rescue ActiveRecord::RecordInvalid
  update_column(:next_run_at, nil) # update without validation
end

#set_next_run_atObject

Raises:

  • (NotImplementedError)

18
19
20
# File 'app/models/concerns/schedulable.rb', line 18

def set_next_run_at
  raise NotImplementedError
end