Skip to content

Commit

Permalink
Return 0% if not joined
Browse files Browse the repository at this point in the history
  • Loading branch information
polsala committed Nov 21, 2024
1 parent 09d99e5 commit e84119c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions oorq/oorq.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def num_jobs(self):

@property
def progress(self):
if not self.joined:
return 0.0
if not self.num_jobs:
return 100.0
return (len(self.done_jobs) * 1.0 / self.num_jobs) * 100
Expand Down

0 comments on commit e84119c

Please sign in to comment.