in mozci/console/commands/decision.py [0:0]
def handle(self):
branch = self.argument("branch")
dry_run = self.option("dry-run")
nb_pushes = int(self.option("nb-pushes"))
self.queue = (
not dry_run and taskcluster.Queue(get_taskcluster_options()) or None
)
self.line(f"Process pushes from {branch}")
# List most recent pushes
for push in make_push_objects(nb=nb_pushes, branch=branch):
if dry_run:
self.line(f"Would classify {push.branch}@{push.rev}")
continue
# Create a child task to classify that push
task_id = self.create_task(push)
self.line(f"<info>Created task {task_id}</info>")