Fixes: #3765 - Possible race condition causing OTRS import to fail
This commit is contained in:
parent
e88fec5bb3
commit
59f1824c3a
2 changed files with 10 additions and 9 deletions
|
@ -0,0 +1,10 @@
|
||||||
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
|
class RemoveOtrsDiffWorkerSchedulerEntry < ActiveRecord::Migration[6.0]
|
||||||
|
def change
|
||||||
|
# return if it's a new setup
|
||||||
|
return if !Setting.exists?(name: 'system_init_done')
|
||||||
|
|
||||||
|
Scheduler.find_by(method: 'Import::OTRS.diff_worker')&.destroy
|
||||||
|
end
|
||||||
|
end
|
|
@ -21,15 +21,6 @@ Scheduler.create_if_not_exists(
|
||||||
prio: 1,
|
prio: 1,
|
||||||
active: true,
|
active: true,
|
||||||
)
|
)
|
||||||
Scheduler.create_if_not_exists(
|
|
||||||
name: 'Import OTRS diff load',
|
|
||||||
method: 'Import::OTRS.diff_worker',
|
|
||||||
period: 3.minutes,
|
|
||||||
prio: 1,
|
|
||||||
active: true,
|
|
||||||
updated_by_id: 1,
|
|
||||||
created_by_id: 1,
|
|
||||||
)
|
|
||||||
Scheduler.create_if_not_exists(
|
Scheduler.create_if_not_exists(
|
||||||
name: 'Check Channels',
|
name: 'Check Channels',
|
||||||
method: 'Channel.fetch',
|
method: 'Channel.fetch',
|
||||||
|
|
Loading…
Reference in a new issue