summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-09-06 19:14:02 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-09-06 19:14:02 +0200
commit0b6f0dd36f5b4c02a444825c77cae02cc5066f34 (patch)
tree6efe97789b316dc80f8d62d322ec19d63109b6fd /pyLoadCore.py
parentgui double logging fix (diff)
downloadpyload-0b6f0dd36f5b4c02a444825c77cae02cc5066f34.tar.xz
gui: status translation, core: added scheduler -> better account fetching UploadedTo + ShareonlineBiz account fix
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 7919ba2b8..263c67274 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -64,6 +64,7 @@ from module.ThreadManager import ThreadManager
import module.remote.SecureXMLRPCServer as Server
from module.web.ServerThread import WebServer
from module.FileDatabase import PyFile
+from module.Scheduler import Scheduler
from codecs import getwriter
if os.name == "nt":
@@ -230,6 +231,8 @@ class Core(object):
self.server_methods = ServerMethods(self)
+ self.scheduler = Scheduler(self)
+
#hell yeah, so many important managers :D
self.files = FileHandler(self)
self.pluginManager = PluginManager(self)
@@ -284,7 +287,10 @@ class Core(object):
f.close()
f = open(link_file, "wb")
f.close()
-
+
+ self.scheduler.start()
+ self.scheduler.addJob(0, self.accountManager.cacheAccountInfos)
+
while True:
sleep(2)
if self.do_restart:
@@ -334,7 +340,6 @@ class Core(object):
frm = logging.Formatter("%(asctime)s %(levelname)-8s %(message)s", "%d.%m.%Y %H:%M:%S")
console.setFormatter(frm)
self.log = logging.getLogger("log") # settable in config
- self.log.myhandlers = []
if self.config['log']['file_log']:
file_handler = logging.handlers.RotatingFileHandler(join(self.config['log']['log_folder'], 'log.txt'),
@@ -708,12 +713,8 @@ class ServerMethods():
def get_events(self, uuid):
return self.core.pullManager.getEvents(uuid)
- def get_accounts(self):
- plugins = self.core.accountManager.getAccountPlugins()
- data = {}
- for p in plugins:
- data[p.__name__] = p.getAllAccounts()
- return data
+ def get_accounts(self, refresh=False):
+ return self.core.accountManager.getAccountInfos(force=refresh)
def update_account(self, plugin, account, password, options=[]):
""" create and update account """
@@ -744,5 +745,5 @@ if __name__ == "__main__":
except KeyboardInterrupt:
pyload_core.shutdown()
pyload_core.log.info(_("killed pyLoad from Terminal"))
- self.removeLogger()
+ pyload_core.removeLogger()
_exit(1)