Maintenance: Fixed wording of scheduler job.
This commit is contained in:
parent
572d91f65e
commit
d63090e67e
3 changed files with 28 additions and 2 deletions
26
db/migrate/20220127135317_scheduler_updates2.rb
Normal file
26
db/migrate/20220127135317_scheduler_updates2.rb
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
||||||
|
|
||||||
|
class SchedulerUpdates2 < ActiveRecord::Migration[6.0]
|
||||||
|
def change
|
||||||
|
return if !Setting.exists?(name: 'system_init_done')
|
||||||
|
|
||||||
|
schedulers_update = [
|
||||||
|
{
|
||||||
|
name: "Clean up 'Cti::Log'.",
|
||||||
|
method: 'Cti::Log.cleanup',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
schedulers_update.each do |scheduler|
|
||||||
|
fetched_scheduler = Scheduler.find_by(method: scheduler[:method])
|
||||||
|
next if !fetched_scheduler
|
||||||
|
|
||||||
|
if scheduler[:name]
|
||||||
|
# p "Updating name of #{scheduler[:name]} to #{scheduler[:name]}"
|
||||||
|
fetched_scheduler.name = scheduler[:name]
|
||||||
|
end
|
||||||
|
|
||||||
|
fetched_scheduler.save!
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -175,7 +175,7 @@ Scheduler.create_if_not_exists(
|
||||||
created_by_id: 1,
|
created_by_id: 1,
|
||||||
)
|
)
|
||||||
Scheduler.create_if_not_exists(
|
Scheduler.create_if_not_exists(
|
||||||
name: __("Clean up 'Cti::Log.'"),
|
name: __("Clean up 'Cti::Log'."),
|
||||||
method: 'Cti::Log.cleanup',
|
method: 'Cti::Log.cleanup',
|
||||||
period: 1.month,
|
period: 1.month,
|
||||||
prio: 2,
|
prio: 2,
|
||||||
|
|
|
@ -1671,7 +1671,7 @@ msgid "City"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: db/seeds/schedulers.rb
|
#: db/seeds/schedulers.rb
|
||||||
msgid "Clean up 'Cti::Log.'"
|
msgid "Clean up 'Cti::Log'."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: db/seeds/schedulers.rb
|
#: db/seeds/schedulers.rb
|
||||||
|
|
Loading…
Reference in a new issue