Restrict the cancelling of a scheduled after_time job is restricted to the current wizard
Dieser Commit ist enthalten in:
Ursprung
11c85270a7
Commit
26302cbad1
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
|
@ -92,12 +92,12 @@ class CustomWizard::AdminController < ::ApplicationController
|
|||
true
|
||||
|
||||
if wizard['after_time'] && new_time
|
||||
Jobs.cancel_scheduled_job(:set_after_time_wizard)
|
||||
Jobs.cancel_scheduled_job(:set_after_time_wizard, wizard_id: wizard['id'])
|
||||
Jobs.enqueue_at(after_time_scheduled, :set_after_time_wizard, wizard_id: wizard['id'])
|
||||
end
|
||||
|
||||
if existing['after_time'] && !wizard['after_time']
|
||||
Jobs.cancel_scheduled_job(:set_after_time_wizard)
|
||||
Jobs.cancel_scheduled_job(:set_after_time_wizard, wizard_id: wizard['id'])
|
||||
Jobs.enqueue(:clear_after_time_wizard, wizard_id: wizard['id'])
|
||||
end
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren