WorkerProcess passes None poll intervals to the backend, breaking acquire in the consumer thread
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python, redis
- Domain
- backend, databases, testing-qa
Research direction
Start with tests/test_executor.py:_make_worker() and WorkerProcess.run(), then inspect RedisTaskBackend.acquire() where the poll intervals are used. Run the relevant executor tests and confirm that default polling no longer reaches acquire as None and that the consumer thread completes without an unhandled TypeError.
Written by the indexing model from the issue text.
Description
Found by testJoe while adding coverage for the fair multi-queue rotation (codingjoe-fair-multi-queue-scheduling), and confirmed pre-existing (untouched by that diff):
defer: WorkerProcess.run() lets None poll overrides reach RedisTaskBackend.acquire, raising TypeError in the consumer thread. Pre-existing, untouched L297. [tests/test_executor.py]
QED
tests/test_executor.py:_make_worker()defaultspoll_intervalandpoll_max_intervaltoNoneand passes them intoWorkerProcess.WorkerProcess.run()assigns them to the backend (backend.poll_interval = self.poll_interval), so the backend's poll options becomeNone.RedisTaskBackend.acquire()computesint(self.poll_max_interval / self.poll_interval), which raisesTypeError: unsupported operand type(s)inside the consumer thread.
The suite only reports PytestUnhandledThreadExceptionWarning, so the failure is invisible today. Either treat None as "keep the backend default" in WorkerProcess, or make the test helper pass the real defaults.
- Dominant language
- Python
- Stars
- 12
- Forks
- 1
- Avg merge
- 19h 11m
- Merged PRs (30d)
- 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from codingjoe/threadmill
-
Difficulty 2/5 Half a day Newbie friendliness 84/100
codingjoe/threadmill#52 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
codingjoe/threadmill#51 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
codingjoe/threadmill#47 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
codingjoe/threadmill#55 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
codingjoe/threadmill#54 ·
All issues in codingjoe/threadmill
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
canonical/paas-charm#368 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
StevenBlack/hosts#3256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
qualcomm/qai-appbuilder#275 ·