get preview in tasks
This commit is contained in:
parent
168b293514
commit
5c5c8ac39b
4 changed files with 26 additions and 16 deletions
|
|
@ -369,12 +369,11 @@ class Node(Thread):
|
|||
return True
|
||||
except:
|
||||
logger.debug('preview download failed %s', url, exc_info=1)
|
||||
return False
|
||||
elif code == 404:
|
||||
pass
|
||||
else:
|
||||
logger.debug('FAILED %s', url)
|
||||
return False
|
||||
return False
|
||||
|
||||
def download_upgrade(self, release):
|
||||
for module in release['modules']:
|
||||
|
|
@ -422,7 +421,6 @@ class Nodes(Thread):
|
|||
Thread.__init__(self)
|
||||
self.daemon = True
|
||||
self.start()
|
||||
self.pull()
|
||||
|
||||
def cleanup(self):
|
||||
if self._running and self._local:
|
||||
|
|
@ -519,6 +517,8 @@ def update_online():
|
|||
'id': settings.USER_ID,
|
||||
'online': state.online
|
||||
})
|
||||
if state.online and state.nodes:
|
||||
state.nodes.pull()
|
||||
|
||||
if settings.OLD_USER_ID and not settings.server.get('migrated_id', False):
|
||||
from . import directory
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue