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

Bugfix `ZeroDivisionError` in TaskModel admin #133

Closed jedie closed 9 months ago

jedie commented 9 months ago

e.g.:

  File ".../site-packages/huey_monitor/models.py", line 124, in human_percentage
    return percentage(num=self.progress_count, total=self.total)
  File ".../site-packages/huey_monitor/humanize.py", line 51, in percentage
    frac = num / total

Exception Type: ZeroDivisionError at /admin/huey_monitor/taskmodel/
Exception Value: division by zero