Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Skrattoune
Copy link
Contributor

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

@Skrattoune
Copy link
Contributor Author

No testing included

huey_monitor/tqdm.py Outdated Show resolved Hide resolved
I let make_complete and make_task_complete as they are slightly different
@codecov-commenter
Copy link

Codecov Report

Merging #98 (ecd0d33) into master (c2e5e21) will decrease coverage by 2.07%.
The diff coverage is 32.35%.

@@            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     
Impacted Files Coverage Δ
huey_monitor_tests/test_app/tasks.py 72.44% <26.08%> (-14.40%) ⬇️
huey_monitor/tqdm.py 83.78% <45.45%> (-16.22%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c2e5e21...ecd0d33. Read the comment docs.

Copy link
Contributor Author

@Skrattoune Skrattoune left a 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)
Copy link
Collaborator

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
Copy link
Collaborator

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):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants