From efe149e5a08554d63a255e6cd03e952e21eddccd Mon Sep 17 00:00:00 2001 From: mkaay Date: Sat, 6 Nov 2010 14:13:51 +0100 Subject: cache fix --- pyLoadCore.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index 04591d0b5..297bb8c59 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -314,7 +314,7 @@ class Core(object): f = open(link_file, "wb") f.close() - self.scheduler.addJob(0, self.accountManager.cacheAccountInfos) + self.scheduler.addJob(0, self.accountManager.getAccountInfos) while True: sleep(2) @@ -752,8 +752,12 @@ class ServerMethods(): def get_events(self, uuid): return self.core.pullManager.getEvents(uuid) - def get_accounts(self, refresh=False): - return self.core.accountManager.getAccountInfos(force=refresh) + def get_accounts(self, force=False, refresh=True): + print force, refresh + if refresh: + return self.core.accountManager.getAccountInfos() + else: + return self.core.accountManager.getCachedAccountInfos(refresh) def update_account(self, plugin, account, password=None, options={}): """ create and update account """ -- cgit v1.2.3