diff options
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py index f8b1ad6e8..54dc9ca39 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -439,9 +439,10 @@ class Core(object): self.running = True self.log.info(_("Activating Plugins...")) - self.hookManager.coreReady() + self.hookManager.activateHooks() self.log.info(_("pyLoad is up and running")) + self.eventManager.dispatchEvent("coreReady") #test api # from module.common.APIExerciser import startApiExerciser @@ -550,10 +551,13 @@ class Core(object): def shutdown(self): self.log.info(_("shutting down...")) + self.eventManager.dispatchEvent("coreShutdown") try: if self.config['webinterface']['activated'] and hasattr(self, "webserver"): self.webserver.quit() + + for thread in self.threadManager.threads: thread.put("quit") pyfiles = self.files.cache.values() @@ -561,7 +565,7 @@ class Core(object): for pyfile in pyfiles: pyfile.abortDownload() - self.hookManager.coreExiting() + self.hookManager.deactivateHooks() except: if self.debug: |