Log lock waits for task adding in WorkerManager
This commit is contained in:
parent
7ca09ba75b
commit
0881e274a9
2 changed files with 26 additions and 1 deletions
|
@ -9,6 +9,7 @@ from .WorkerTaskManager import WorkerTaskManager
|
|||
from Config import config
|
||||
from util import helper
|
||||
from Plugin import PluginManager
|
||||
from Debug.DebugLock import DebugLock
|
||||
import util
|
||||
|
||||
|
||||
|
@ -20,7 +21,7 @@ class WorkerManager(object):
|
|||
self.workers = {} # Key: ip:port, Value: Worker.Worker
|
||||
self.tasks = WorkerTaskManager()
|
||||
self.next_task_id = 1
|
||||
self.lock_add_task = gevent.lock.Semaphore(1)
|
||||
self.lock_add_task = DebugLock()
|
||||
# {"id": 1, "evt": evt, "workers_num": 0, "site": self.site, "inner_path": inner_path, "done": False, "optional_hash_id": None,
|
||||
# "time_started": None, "time_added": time.time(), "peers": peers, "priority": 0, "failed": peer_ids, "lock": None or gevent.lock.RLock}
|
||||
self.started_task_num = 0 # Last added task num
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue