Spawn site announce to new async line
This commit is contained in:
parent
8c76e258d7
commit
035d70cf57
1 changed files with 1 additions and 6 deletions
|
@ -347,12 +347,7 @@ class FileServer(ConnectionServer):
|
||||||
for address, site in self.sites.items():
|
for address, site in self.sites.items():
|
||||||
if not site.settings["serving"]:
|
if not site.settings["serving"]:
|
||||||
continue
|
continue
|
||||||
site.announce(mode="update", pex=False)
|
gevent.spawn(self.announceSite, site).join(timeout=10)
|
||||||
active_site = time.time() - site.settings.get("modified", 0) < 24 * 60 * 60
|
|
||||||
if site.settings["own"] or active_site: # Check connections more frequently on own and active sites to speed-up first connections
|
|
||||||
site.needConnections(check_site_on_reconnect=True)
|
|
||||||
site.sendMyHashfield(3)
|
|
||||||
site.updateHashfield(3)
|
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
taken = time.time() - s
|
taken = time.time() - s
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue