-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#97 helpers for more flexible tasks progression #98
base: main
Are you sure you want to change the base?
Conversation
Documenting the use of the helper functions described in boxine#97
helper functions described in boxine#97 Use documented in https://github.com/boxine/django-huey-monitor/blob/master/huey_monitor_tests/test_app/tasks.py
No testing included |
I let make_complete and make_task_complete as they are slightly different
Codecov Report
@@ Coverage Diff @@
## master #98 +/- ##
==========================================
- Coverage 83.31% 81.23% -2.08%
==========================================
Files 40 40
Lines 809 842 +33
==========================================
+ Hits 674 684 +10
- Misses 135 158 +23
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok for me
sub_task_id=task.id, | ||
) | ||
# let's consider we don't know yet the number of steps | ||
process_info = ProcessInfo(task, desc='Recursive task execution', total=999) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. total=999
is a little bit ugly, isn't it?
Can we resolve this in a other way?
|
||
while continue_with_next_step: | ||
# we execute the step: | ||
continue_with_next_step = random.randrange(100)<80 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just a normal for loop?
e.g.:
for _ in range(random.randrange(80,100):
helper functions described in #97
Use documented in https://github.com/boxine/django-huey-monitor/blob/master/huey_monitor_tests/test_app/tasks.pyhe use of the helper functions described in #97