From cad33cec0ca6d19c66beaef2746f30630ff98102 Mon Sep 17 00:00:00 2001 From: Nitzo Date: Fri, 29 Jan 2016 21:32:07 +0200 Subject: [Bace] fix race condition with `assignJob` --- module/plugins/internal/Base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'module/plugins') diff --git a/module/plugins/internal/Base.py b/module/plugins/internal/Base.py index e6055e454..34ccde08b 100644 --- a/module/plugins/internal/Base.py +++ b/module/plugins/internal/Base.py @@ -27,7 +27,7 @@ def parse_fileInfo(klass, url="", html=""): class Base(Plugin): __name__ = "Base" __type__ = "base" - __version__ = "0.23" + __version__ = "0.24" __status__ = "stable" __pattern__ = r'^unmatchable$' @@ -286,7 +286,10 @@ class Base(Plugin): #: Deprecated method, use `_process` instead (Remove in 0.4.10) def preprocessing(self, *args, **kwargs): - time.sleep(1) #@NOTE: Recheck info thread synchronization in 0.4.10 + self.pyfile.setStatus("starting") #@NOTE: Set pyfile status from `queued` to `starting` as soon as possible to avoid race condition in ThreadManager's assignJob function + + #@NOTE: Recheck info thread synchronization in 0.4.10 + # time.sleep(1) return self._process(*args, **kwargs) -- cgit v1.2.3