MCPcopy Index your code
hub / github.com/HelloZeroNet/ZeroNet / start

Method start

src/File/FileServer.py:348–365  ·  view source on GitHub ↗
(self, check_sites=True)

Source from the content-addressed store, hash-verified

346
347 # Bind and start serving sites
348 def start(self, check_sites=True):
349 ConnectionServer.start(self)
350 self.sites = self.site_manager.list()
351 if config.debug:
352 # Auto reload FileRequest on change
353 from Debug import DebugReloader
354 DebugReloader.watcher.addCallback(self.reload)
355
356 if check_sites: # Open port, Update sites, Check files integrity
357 gevent.spawn(self.checkSites)
358
359 thread_announce_sites = gevent.spawn(self.announceSites)
360 thread_cleanup_sites = gevent.spawn(self.cleanupSites)
361 thread_wakeup_watcher = gevent.spawn(self.wakeupWatcher)
362
363 ConnectionServer.listen(self)
364
365 self.log.debug("Stopped.")
366
367 def stop(self):
368 if self.running and self.portchecker.upnp_port_opened:

Callers 1

siteAnnounceMethod · 0.95

Calls 3

addCallbackMethod · 0.80
listMethod · 0.45
listenMethod · 0.45

Tested by

no test coverage detected