|
|
@ -104,10 +104,17 @@ def create_task(aav, profile, inputs, args, filename_from=None): |
|
|
|
def task_name(task): |
|
|
|
def task_name(task): |
|
|
|
if hasattr(task, "name"): |
|
|
|
if hasattr(task, "name"): |
|
|
|
return basename(task.name) |
|
|
|
return basename(task.name) |
|
|
|
elif task.inputs: |
|
|
|
elif task.inputs or task.outputs: |
|
|
|
return "<%s" % task.inputs[0].name |
|
|
|
name = "ffT" |
|
|
|
elif task.outputs: |
|
|
|
if task.inputs: |
|
|
|
return ">%s" % task.outputs[0].name |
|
|
|
name += " <`%s`" % task.inputs[0].name |
|
|
|
|
|
|
|
if len(task.inputs) > 1: |
|
|
|
|
|
|
|
name += "..." |
|
|
|
|
|
|
|
if task.outputs: |
|
|
|
|
|
|
|
name += " >`%s`" % task.outputs[0].name |
|
|
|
|
|
|
|
if len(task.outputs) > 1: |
|
|
|
|
|
|
|
name += "..." |
|
|
|
|
|
|
|
return name |
|
|
|
else: |
|
|
|
else: |
|
|
|
return "(anon task %p)" % id(task) |
|
|
|
return "(anon task %p)" % id(task) |
|
|
|
|
|
|
|
|
|
|
@ -204,8 +211,9 @@ def main(argv): |
|
|
|
|
|
|
|
|
|
|
|
# Commit |
|
|
|
# Commit |
|
|
|
for task in tasks: |
|
|
|
for task in tasks: |
|
|
|
task.commit2().then(lambda x: print("\033[32m Finished '%s'\033[0m" % task_name(task)))\ |
|
|
|
name = task_name(task) |
|
|
|
.catch(lambda e: print("\033[31m Failed '%s': %s\033[0m" % (task_name(task), e))) |
|
|
|
task.commit2().then(lambda x: print("\033[32m Finished '%s'\033[0m" % name))\ |
|
|
|
|
|
|
|
.catch(lambda e: print("\033[31m Failed '%s': %s\033[0m" % (name, e))) |
|
|
|
|
|
|
|
|
|
|
|
aav.process_queue() |
|
|
|
aav.process_queue() |
|
|
|
aav.wait() |
|
|
|
aav.wait() |
|
|
|