MCPcopy Index your code
hub / github.com/pyload/pyload / startBackends

Method startBackends

module/remote/RemoteManager.py:71–91  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69
70
71 def startBackends(self):
72 host = self.core.config["remote"]["listenaddr"]
73 port = self.core.config["remote"]["port"]
74
75 for b in self.available:
76 klass = getattr(__import__("module.remote.%s" % b, globals(), locals(), [b], -1), b)
77 backend = klass(self)
78 if not backend.checkDeps():
79 continue
80 try:
81 backend.setup(host, port)
82 self.core.log.info(_("Starting %(name)s: %(addr)s:%(port)s") % {"name": b, "addr": host, "port": port})
83 except Exception, e:
84 self.core.log.error(_("Failed loading backend %(name)s | %(error)s") % {"name": b, "error": str(e)})
85 if self.core.debug:
86 print_exc()
87 else:
88 backend.start()
89 self.backends.append(backend)
90
91 port += 1

Callers 1

startMethod · 0.80

Calls 6

checkDepsMethod · 0.80
_Function · 0.50
setupMethod · 0.45
errorMethod · 0.45
startMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected