Decision task: print IDs of tasks scheduled or found in the index

This commit is contained in:
Simon Sapin 2018-12-13 11:38:48 +01:00
parent 8de59c15b5
commit 27e903bab8
2 changed files with 6 additions and 4 deletions

View file

@ -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):
"""