mirror of
https://github.com/codingo/Interlace.git
synced 2025-12-17 14:54:21 +01:00
Fixed blocker bug
This commit is contained in:
@@ -112,9 +112,11 @@ class InputHelper(object):
|
||||
if task_name == new_task_name:
|
||||
return task_block
|
||||
# otherwise pre-process all the commands in this new `new_task_name` block
|
||||
for task in InputHelper._pre_process_commands(command_list, new_task_name, False):
|
||||
tasks = InputHelper._pre_process_commands(command_list, new_task_name, False)
|
||||
for task in tasks:
|
||||
task_block.append(task)
|
||||
sibling = task
|
||||
if len(tasks) > 0:
|
||||
sibling = tasks[-1]
|
||||
continue
|
||||
else:
|
||||
# if a blocker is encountered, all commands following the blocker must wait until the last
|
||||
@@ -126,10 +128,10 @@ class InputHelper(object):
|
||||
# if we're in the global scope and there was a previous _blocker_ encountered, we wait for the last
|
||||
# child of the block
|
||||
if is_global_task and global_task:
|
||||
task.wait_for(global_task.get_lock())
|
||||
task.wait_for(task_block)
|
||||
# all but the first command in a block scope wait for its predecessor
|
||||
elif sibling and not is_global_task:
|
||||
task.wait_for(sibling.get_lock())
|
||||
task.wait_for([sibling])
|
||||
task_block.append(task)
|
||||
sibling = task
|
||||
return task_block
|
||||
|
||||
Reference in New Issue
Block a user