trigger ativity after cancel
This commit is contained in:
parent
8b77c634f3
commit
c0cab079bc
1 changed files with 6 additions and 0 deletions
|
@ -14,6 +14,7 @@ import query
|
||||||
import models
|
import models
|
||||||
import settings
|
import settings
|
||||||
import state
|
import state
|
||||||
|
from websocket import trigger_event
|
||||||
|
|
||||||
import meta
|
import meta
|
||||||
|
|
||||||
|
@ -251,5 +252,10 @@ actions.register(_import, 'import', cache=False)
|
||||||
|
|
||||||
def cancelImport(data):
|
def cancelImport(data):
|
||||||
state.activity['cancel'] = True
|
state.activity['cancel'] = True
|
||||||
|
trigger_event('activity', {
|
||||||
|
'activity': 'import',
|
||||||
|
'progress': [0, 0],
|
||||||
|
'status': {'code': 200, 'text': 'canceled'}
|
||||||
|
})
|
||||||
return {}
|
return {}
|
||||||
actions.register(cancelImport, cache=False)
|
actions.register(cancelImport, cache=False)
|
||||||
|
|
Loading…
Reference in a new issue