mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Deduplicate task dependencies
This commit is contained in:
parent
203a06ff24
commit
83921dbc99
1 changed files with 6 additions and 1 deletions
|
@ -221,9 +221,14 @@ class Task:
|
|||
assert CONFIG.decision_task_id
|
||||
assert CONFIG.task_owner
|
||||
assert CONFIG.task_source
|
||||
|
||||
def dedup(xs):
|
||||
seen = set()
|
||||
return [x for x in xs if not (x in seen or seen.add(x))]
|
||||
|
||||
queue_payload = {
|
||||
"taskGroupId": CONFIG.decision_task_id,
|
||||
"dependencies": [CONFIG.decision_task_id] + self.dependencies,
|
||||
"dependencies": dedup([CONFIG.decision_task_id] + self.dependencies),
|
||||
"schedulerId": self.scheduler_id,
|
||||
"provisionerId": self.provisioner_id,
|
||||
"workerType": self.worker_type,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue