mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Decision task: print IDs of tasks scheduled or found in the index
This commit is contained in:
parent
8de59c15b5
commit
27e903bab8
2 changed files with 6 additions and 4 deletions
|
@ -228,13 +228,15 @@ class Task:
|
|||
|
||||
task_id = taskcluster.slugId().decode("utf8")
|
||||
SHARED.queue_service.createTask(task_id, queue_payload)
|
||||
print("Scheduled %s" % self.name)
|
||||
print("Scheduled %s: %s" % (task_id, self.name))
|
||||
return task_id
|
||||
|
||||
@staticmethod
|
||||
def find(index_path):
|
||||
full_index_path = "%s.%s" % (CONFIG.index_prefix, index_path)
|
||||
return SHARED.index_service.findTask(full_index_path)["taskId"]
|
||||
task_id = SHARED.index_service.findTask(full_index_path)["taskId"]
|
||||
print("Found task %s indexed at %s" % (task_id, full_index_path))
|
||||
return task_id
|
||||
|
||||
def find_or_create(self, index_path=None):
|
||||
"""
|
||||
|
|
|
@ -33,12 +33,12 @@ class Index:
|
|||
|
||||
def findTask(self, path):
|
||||
if decision_task.CONFIG.git_ref == "refs/heads/master":
|
||||
return {"taskId": ""}
|
||||
return {"taskId": "<from index>"}
|
||||
raise TaskclusterRestFailure
|
||||
|
||||
|
||||
stringDate = str
|
||||
slugId = b"id".lower
|
||||
slugId = b"<new id>".lower
|
||||
Queue = fromNow = MagicMock()
|
||||
sys.modules["taskcluster"] = sys.modules[__name__]
|
||||
sys.dont_write_bytecode = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue