summaryrefslogtreecommitdiffstats
path: root/pyload/threads
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-09-29 13:03:17 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2013-09-29 13:03:17 +0200
commit6a997661dc5c259f844531382a90a4ca120f1233 (patch)
tree085a76d4bac208963649a62f9393e0c0b049e869 /pyload/threads
parentrewritten decrypter and info fetching thread (diff)
downloadpyload-6a997661dc5c259f844531382a90a4ca120f1233.tar.xz
basics for web setup
Diffstat (limited to 'pyload/threads')
-rw-r--r--pyload/threads/BaseThread.py9
-rw-r--r--pyload/threads/ThreadManager.py7
2 files changed, 9 insertions, 7 deletions
diff --git a/pyload/threads/BaseThread.py b/pyload/threads/BaseThread.py
index b7912e924..3655480dd 100644
--- a/pyload/threads/BaseThread.py
+++ b/pyload/threads/BaseThread.py
@@ -10,6 +10,7 @@ from traceback import format_exc
from pyload.utils import primary_uid
from pyload.utils.fs import listdir, join, save_join, stat, exists
+from pyload.setup.system import get_system_info
class BaseThread(Thread):
@@ -137,9 +138,7 @@ class BaseThread(Thread):
def getSystemDump(self):
dump = "SYSTEM:\n\n"
- dump += """Platform: %s
-Version: %s
-Encoding: %s
-FS-Encoding: %s
- """ % (sys.platform, sys.version, sys.getdefaultencoding(), sys.getfilesystemencoding())
+ for k,v in get_system_info().iteritems():
+ dump += "%s: %s\n" % (k, v)
+
return dump
diff --git a/pyload/threads/ThreadManager.py b/pyload/threads/ThreadManager.py
index ff8bfe8d7..07b0cd6e9 100644
--- a/pyload/threads/ThreadManager.py
+++ b/pyload/threads/ThreadManager.py
@@ -167,11 +167,14 @@ class ThreadManager:
self.assignJob()
#it may be failed non critical so we try it again
- if (self.infoCache or self.infoResults) and self.timestamp < time():
+ if self.infoCache and self.timestamp < time():
self.infoCache.clear()
- self.infoResults.clear()
self.log.debug("Cleared Result cache")
+ for rid in self.infoResults.keys():
+ if self.infoResults[rid].isStale():
+ del self.infoResults[rid]
+
def tryReconnect(self):
"""checks if reconnect needed"""