only one scanimport
This commit is contained in:
parent
cfb6913ef6
commit
ac3dd595cf
2 changed files with 2 additions and 3 deletions
|
@ -512,6 +512,7 @@ def publish_node():
|
|||
state.check_nodes.start()
|
||||
state._online = PeriodicCallback(update_online, 60000)
|
||||
state._online.start()
|
||||
state.nodes.pull()
|
||||
|
||||
def update_online():
|
||||
online = state.tor and state.tor.is_online()
|
||||
|
@ -521,8 +522,6 @@ 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
|
||||
|
|
|
@ -155,8 +155,8 @@ def run():
|
|||
state.main.call_later(10, publish)
|
||||
else:
|
||||
nodes.publish_node()
|
||||
state.main.call_later(10, lambda: state.tasks.queue('scanimport'))
|
||||
state.main.add_callback(publish)
|
||||
state.main.call_later(10, lambda: state.tasks.queue('scanimport'))
|
||||
|
||||
if not state.update:
|
||||
state.tasks = tasks.Tasks()
|
||||
|
|
Loading…
Reference in a new issue