You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set a post task on multiple tasks Invoke correctly only executes it once. But it is executed after the first task that has it as a post task, instead of waiting until the last task is done which has the task as post task.
Code
importinvoke@invoke.taskdefpost_task(_: invoke.Context) ->None:
print('The last task')
@invoke.task(post=[post_task])defpre_task_1(_: invoke.Context) ->None:
print('The first pre task')
@invoke.task(post=[post_task])defpre_task_2(_: invoke.Context) ->None:
print('The second pre task')
@invoke.task(default=True, pre=[pre_task_1, pre_task_2], post=[post_task])defmain(ctx: invoke.Context) ->None:
print('The main task')
Expected output
The first pre task
The second pre task
The main task
The last task
Output result
The first pre task
The last task
The second pre task
The main task
Additional information
Invoke 2.2.0
Python 3.11.6
The text was updated successfully, but these errors were encountered:
Description
When I set a post task on multiple tasks Invoke correctly only executes it once. But it is executed after the first task that has it as a post task, instead of waiting until the last task is done which has the task as post task.
Code
Expected output
Output result
Additional information
The text was updated successfully, but these errors were encountered: