From 1fce480bc8ba6eeccae5036b6842c8f03c746e0c Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 21 Jul 2011 12:08:06 +0200 Subject: improved online check --- module/Api.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'module/Api.py') diff --git a/module/Api.py b/module/Api.py index 0cc2dc1d4..e7638560e 100644 --- a/module/Api.py +++ b/module/Api.py @@ -282,7 +282,7 @@ class Api(Iface): return plugins - def checkOnlineStatus(self, urls, container=None): + def checkOnlineStatus(self, urls): """ initiates online status check :param urls: @@ -290,7 +290,7 @@ class Api(Iface): """ data = self.core.pluginManager.parseUrls(urls) - rid = self.core.threadManager.createResultThread(data, False, container) + rid = self.core.threadManager.createResultThread(data, False) tmp = [(url, (url, OnlineStatus(url, pluginname, "unknown", 3, 0))) for url, pluginname in data] data = parseNames(tmp) @@ -315,7 +315,7 @@ class Api(Iface): th.write(str(data)) th.close() - return self.checkOnlineStatus(urls, th.name) + return self.checkOnlineStatus(urls + [th.name]) def pollResults(self, rid): """ Polls the result available for ResultID @@ -323,8 +323,6 @@ class Api(Iface): :param rid: if -1 no more data is available :return: """ - self.core.threadManager.timestamp = time() + 5 * 60 - result = self.core.threadManager.getInfoResult(rid) if "ALL_INFO_FETCHED" in result: -- cgit v1.2.3