Enhancement: Skip CTI log update when import_mode is active.
This commit is contained in:
parent
da7cffd7bc
commit
6839d6e3e0
2 changed files with 10 additions and 0 deletions
|
@ -345,6 +345,7 @@ return users by caller_id
|
|||
end
|
||||
|
||||
def update_cti_logs_with_fg_optimization
|
||||
return if Setting.get('import_mode')
|
||||
return if object != 'User'
|
||||
return if level != 'known'
|
||||
|
||||
|
|
|
@ -300,6 +300,15 @@ RSpec.describe Cti::CallerId do
|
|||
|
||||
caller_id.save
|
||||
end
|
||||
|
||||
it 'skips jobs on import_mode true' do
|
||||
Setting.set('import_mode', true)
|
||||
|
||||
expect(UpdateCtiLogsByCallerJob).not_to receive(:perform_now)
|
||||
expect(UpdateCtiLogsByCallerJob).not_to receive(:perform_later)
|
||||
|
||||
caller_id.save
|
||||
end
|
||||
end
|
||||
|
||||
describe 'on destruction' do
|
||||
|
|
Loading…
Reference in a new issue