Task.completed(ignore_errors=False)
What are you getting?
I failed to update the "STARTED AT" and the "COMPLETED AT" attributes in the "INFO" tab.
I'm not sure this can actually be overridden...
I got the following Error:2020-10-27 19:26:57,222 - trains.Task - ERROR - Action failed <500/0: tasks.completed/v2.2 (unsupported operand type(s) for -: 'NoneType' and 'datetime.datetime')> (force=False, task=9bbd60866e5646c8aacad418ae7fc86f, status_reason=completed)
Hi SpotlessFish46 ,
can you send a code example? I want to try reproduce it on my side
After the running, I checked in the web UI if the status changed, and it didn't —the running finishing without any errors or replies.
Great! now it's working. The status changed to completed.
Thanks TimelyPenguin76 !
Task.completed(ignore_errors=True)
I tried to use it, but the status still unchanged.
Hi SpotlessFish46
In order to mark task as completed, it should start first, can you try:
task = Task.create(project_name="projectX", task_name='YYY') task.mark_started() task.completed()?
I couldn't change the task status from draft to complete
Task.completed(ignore_errors=True)
Hi TimelyPenguin76 ,
the code example is:task = Task.create(project_name="projectX", task_name='Y') task.completed(ignore_errors=False)