Skip to content

Commit

Permalink
Ensure we're passing an int to randint
Browse files Browse the repository at this point in the history
closes #5861

(cherry picked from commit a6df7e1)
  • Loading branch information
sdherr authored and ggainey committed Nov 11, 2024
1 parent 03ae6e6 commit 8245576
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES/5861.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pulp-worker fails to start with "float object cannot be interpreted as an integer" on some versions of python.
2 changes: 1 addition & 1 deletion pulpcore/tasking/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self):
self.worker = self.handle_worker_heartbeat()
self.task_grace_timeout = 0
self.worker_cleanup_countdown = random.randint(
WORKER_CLEANUP_INTERVAL / 10, WORKER_CLEANUP_INTERVAL
int(WORKER_CLEANUP_INTERVAL / 10), WORKER_CLEANUP_INTERVAL
)

meter = get_meter(__name__)
Expand Down

0 comments on commit 8245576

Please sign in to comment.