Boost priority to first added file to queue
This commit is contained in:
parent
2efb6cf4f1
commit
a2eef70030
1 changed files with 4 additions and 0 deletions
|
@ -428,6 +428,10 @@ class WorkerManager(object):
|
||||||
else:
|
else:
|
||||||
size = 0
|
size = 0
|
||||||
priority += self.getPriorityBoost(inner_path)
|
priority += self.getPriorityBoost(inner_path)
|
||||||
|
|
||||||
|
if self.started_task_num == 0: # Boost priority for first requested file
|
||||||
|
priority += 1
|
||||||
|
|
||||||
task = {
|
task = {
|
||||||
"evt": evt, "workers_num": 0, "site": self.site, "inner_path": inner_path, "done": False,
|
"evt": evt, "workers_num": 0, "site": self.site, "inner_path": inner_path, "done": False,
|
||||||
"optional_hash_id": optional_hash_id, "time_added": time.time(), "time_started": None,
|
"optional_hash_id": optional_hash_id, "time_added": time.time(), "time_started": None,
|
||||||
|
|
Loading…
Reference in a new issue