fix transfer migration
This commit is contained in:
parent
6ce76dfa9c
commit
ca03f71659
2 changed files with 5 additions and 2 deletions
|
@ -544,6 +544,7 @@ def migrate_11():
|
||||||
session.commit()
|
session.commit()
|
||||||
import state
|
import state
|
||||||
import downloads
|
import downloads
|
||||||
|
state.online = False
|
||||||
state.downloads = downloads.Downloads()
|
state.downloads = downloads.Downloads()
|
||||||
for t in Transfer.query:
|
for t in Transfer.query:
|
||||||
if t.added:
|
if t.added:
|
||||||
|
@ -553,5 +554,7 @@ def migrate_11():
|
||||||
}
|
}
|
||||||
state.db.session.add(t)
|
state.db.session.add(t)
|
||||||
state.db.session.commit()
|
state.db.session.commit()
|
||||||
downloads.join()
|
state.shutdown = True
|
||||||
|
state.downloads.join()
|
||||||
|
state.downlodas = None
|
||||||
return 11
|
return 11
|
||||||
|
|
|
@ -35,7 +35,7 @@ class Handler(WebSocketHandler):
|
||||||
if self not in state.websockets:
|
if self not in state.websockets:
|
||||||
state.websockets.append(self)
|
state.websockets.append(self)
|
||||||
if state.update:
|
if state.update:
|
||||||
trigger_event('updatestatus', state.tasks._status)
|
trigger_event('updatestatus', state.update._status)
|
||||||
else:
|
else:
|
||||||
from user.models import User
|
from user.models import User
|
||||||
trigger_event('status', {
|
trigger_event('status', {
|
||||||
|
|
Loading…
Reference in a new issue