boxine / django-huey-monitor

Django based tool for monitoring huey task queue: https://github.com/coleifer/huey
GNU General Public License v3.0
86 stars 20 forks source link

Remove TaskProgressModel and store progress in TaskModel.progress_count #76

Closed jedie closed 2 years ago

jedie commented 2 years ago

Remove the TaskProgressModel and store progress information directly into TaskModel. The existing TaskProgressModel progress information will be migrated into TaskModel ;)

Also store the current progress count into SignalInfoModel instance: So it is stored at which progress the signal was generated.

Add TaskModel.cumulate_progress field that indicates if progress of the sub tasks be added up and saved in the parent task.

Add TaskModel.finished field that indicates that this Task no longer waits or run.

Idea comes from: https://github.com/boxine/django-huey-monitor/discussions/57#discussioncomment-2103353

codecov-commenter commented 2 years ago

Codecov Report

Merging #76 (828e260) into master (865155d) will decrease coverage by 0.54%. The diff coverage is 84.70%.

:exclamation: Current head 828e260 differs from pull request most recent head 0b92aac. Consider uploading reports for the commit 0b92aac to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   83.69%   83.14%   -0.55%     
==========================================
  Files          35       39       +4     
  Lines         791      795       +4     
==========================================
- Hits          662      661       -1     
- Misses        129      134       +5     
Impacted Files Coverage Δ
huey_monitor/migrations/0007_data_migration.py 52.63% <52.63%> (ø)
huey_monitor/humanize.py 88.46% <75.00%> (-2.45%) :arrow_down:
huey_monitor/models.py 95.57% <89.47%> (+2.14%) :arrow_up:
huey_monitor/tasks.py 87.50% <95.45%> (+8.01%) :arrow_up:
huey_monitor/admin.py 76.92% <100.00%> (ø)
huey_monitor/constants.py 100.00% <100.00%> (ø)
huey_monitor/migrations/0006_add_progress_count.py 100.00% <100.00%> (ø)
...onitor/migrations/0008_delete_taskprogressmodel.py 100.00% <100.00%> (ø)
huey_monitor/tqdm.py 100.00% <100.00%> (ø)
huey_monitor_tests/tests/test_huey_monitor.py 100.00% <100.00%> (ø)
... and 3 more

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 865155d...0b92aac. Read the comment docs.