fix transfer migration

This commit is contained in:
j 2016-02-12 18:23:02 +05:30
parent 6ce76dfa9c
commit ca03f71659
2 changed files with 5 additions and 2 deletions

View file

@ -544,6 +544,7 @@ def migrate_11():
session.commit()
import state
import downloads
state.online = False
state.downloads = downloads.Downloads()
for t in Transfer.query:
if t.added:
@ -553,5 +554,7 @@ def migrate_11():
}
state.db.session.add(t)
state.db.session.commit()
downloads.join()
state.shutdown = True
state.downloads.join()
state.downlodas = None
return 11

View file

@ -35,7 +35,7 @@ class Handler(WebSocketHandler):
if self not in state.websockets:
state.websockets.append(self)
if state.update:
trigger_event('updatestatus', state.tasks._status)
trigger_event('updatestatus', state.update._status)
else:
from user.models import User
trigger_event('status', {