Skip to content

#97 helpers for more flexible tasks progression#98

Open
Skrattoune wants to merge 3 commits intoboxine:mainfrom
Skrattoune:patch-6
Open

#97 helpers for more flexible tasks progression#98
Skrattoune wants to merge 3 commits intoboxine:mainfrom
Skrattoune:patch-6

Conversation

@Skrattoune
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

No testing included

Comment thread huey_monitor/tqdm.py Outdated
I let make_complete and make_task_complete as they are slightly different
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 30, 2022

Codecov Report

❌ Patch coverage is 32.35294% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.23%. Comparing base (c2e5e21) to head (ecd0d33).
⚠️ Report is 88 commits behind head on main.

Files with missing lines Patch % Lines
huey_monitor_tests/test_app/tasks.py 26.08% 17 Missing ⚠️
huey_monitor/tqdm.py 45.45% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
- Coverage   83.31%   81.23%   -2.08%     
==========================================
  Files          40       40              
  Lines         809      842      +33     
==========================================
+ Hits          674      684      +10     
- Misses        135      158      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
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
Copy Markdown
Member

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
Copy Markdown
Member

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