Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 20:02:54 +01:00
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
|
true
|
||||||
|
|
||||||
if wizard['after_time'] && new_time
|
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'])
|
Jobs.enqueue_at(after_time_scheduled, :set_after_time_wizard, wizard_id: wizard['id'])
|
||||||
end
|
end
|
||||||
|
|
||||||
if existing['after_time'] && !wizard['after_time']
|
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'])
|
Jobs.enqueue(:clear_after_time_wizard, wizard_id: wizard['id'])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren