Skip to content

Commit 9b6fd7f

Browse files
authored
adapt testing & example
1 parent fd54909 commit 9b6fd7f

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

huey_monitor_tests/test_app/tasks.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,10 @@ def parallel_sub_task(task, parent_task_id, item_chunk, **info_kwargs):
8787
"""
8888
Useless example: Just calculate the SHA256 hash from all files
8989
"""
90-
# Save relationship between the main and sub tasks:
91-
TaskModel.objects.set_parent_task(
92-
main_task_id=parent_task_id,
93-
sub_task_id=task.id
94-
)
95-
9690
total_items = len(item_chunk)
9791

98-
# Init progress information of this sub task:
92+
# Init progress information of this sub task
93+
# and save relationship between the main and sub tasks:
9994
process_info = ProcessInfo(
10095
task, total=total_items, parent_task_id=parent_task_id, **info_kwargs
10196
)

0 commit comments

Comments
 (0)