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
  • Loading branch information
sdherr committed Oct 3, 2024
1 parent 85feedb commit 16baaa8
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 @@ -61,7 +61,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
)

# Add a file descriptor to trigger select on signals
Expand Down

0 comments on commit 16baaa8

Please sign in to comment.