Removed not necessary thread and code cleanup.
This commit is contained in:
parent
363943b196
commit
352ffd7aa8
3 changed files with 6 additions and 11 deletions
|
@ -151,11 +151,7 @@ class Index extends App.ControllerContent
|
|||
success: (data, status, xhr) =>
|
||||
|
||||
if data.result is 'import_done'
|
||||
delay = 0
|
||||
if @Config.get('developer_mode') is true
|
||||
delay = 5000
|
||||
|
||||
@delay(window.location.reload, delay)
|
||||
window.location.reload()
|
||||
return
|
||||
|
||||
if data.result is 'error'
|
||||
|
|
|
@ -440,11 +440,9 @@ module Import::OTRS
|
|||
}
|
||||
sleep 2
|
||||
|
||||
# start thread to import data
|
||||
# start import data
|
||||
begin
|
||||
import_thread = Thread.new {
|
||||
Import::OTRS.start
|
||||
}
|
||||
Import::OTRS.start
|
||||
rescue => e
|
||||
status_update_thread.exit
|
||||
status_update_thread.join
|
||||
|
@ -457,7 +455,7 @@ module Import::OTRS
|
|||
Cache.write('import:state', result, expires_in: 10.hours)
|
||||
return false
|
||||
end
|
||||
import_thread.join
|
||||
sleep 16 # wait until new finished import state is on client
|
||||
status_update_thread.exit
|
||||
status_update_thread.join
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ module Import::Zendesk
|
|||
}
|
||||
sleep 2
|
||||
|
||||
# start thread to import data
|
||||
# start import data
|
||||
begin
|
||||
Import::Zendesk.start
|
||||
rescue => e
|
||||
|
@ -90,6 +90,7 @@ module Import::Zendesk
|
|||
Cache.write('import:state', result, expires_in: 10.hours)
|
||||
return false
|
||||
end
|
||||
sleep 16 # wait until new finished import state is on client
|
||||
status_update_thread.exit
|
||||
status_update_thread.join
|
||||
|
||||
|
|
Loading…
Reference in a new issue