summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-11 13:32:44 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-08-11 13:32:44 +0200
commit8e7c39898188274f86159e2f8d5959edd31bb767 (patch)
treefa24617c912c79fec9af2d49d7abc212ddb7356a /module
parentcorrect order in webif (diff)
downloadpyload-8e7c39898188274f86159e2f8d5959edd31bb767.tar.xz
fixes
Diffstat (limited to 'module')
-rw-r--r--module/FileDatabase.py7
-rw-r--r--module/plugins/hoster/NetloadIn.py1
-rw-r--r--module/web/pyload/views.py1
3 files changed, 6 insertions, 3 deletions
diff --git a/module/FileDatabase.py b/module/FileDatabase.py
index a7d32b125..c89656407 100644
--- a/module/FileDatabase.py
+++ b/module/FileDatabase.py
@@ -474,16 +474,19 @@ class FileDatabaseBackend(Thread):
def new(*args):
args[0].lock.acquire()
args[0].jobs.put((func, args, 0))
- sleep(0.001) # needed so that no thread takes result of other one
+ res = args[0].res.get()
args[0].lock.release()
- return args[0].res.get()
+ return res
+
return new
def async(func):
"""use as decorator when function does not return anything and asynchron execution is wanted"""
def new(*args):
+ args[0].lock.acquire()
args[0].jobs.put((func, args, 1))
+ args[0].lock.release()
return True
return new
diff --git a/module/plugins/hoster/NetloadIn.py b/module/plugins/hoster/NetloadIn.py
index f9e3d31ad..9e117fa14 100644
--- a/module/plugins/hoster/NetloadIn.py
+++ b/module/plugins/hoster/NetloadIn.py
@@ -146,6 +146,7 @@ class NetloadIn(Hoster):
self.log.debug("Netload: Wait was 0 setting 30")
wait = 30
self.log.info(_("Netload: waiting between downloads %d s." % wait))
+ self.wantReconnect = True
self.setWait(wait)
self.wait()
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index 8cdef094b..b8cbacf30 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -10,7 +10,6 @@ from os.path import join
from urllib import unquote
from itertools import chain
from datetime import datetime
-from operator import itemgetter
from django.conf import settings
from django.contrib.auth.decorators import login_required