Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

WorkerProcess passes None poll intervals to the backend, breaking acquire in the consumer thread

Aperta Adatta ai principianti
#53 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python, redis

Direzione di ricerca

Inizia da tests/test_executor.py:_make_worker() e WorkerProcess.run(), quindi esamina RedisTaskBackend.acquire(), dove vengono utilizzati gli intervalli di polling. Esegui i test pertinenti dell’executor e conferma che il polling predefinito non raggiunga più acquire come None e che il thread consumer termini senza un TypeError non gestito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

  1. tests/test_executor.py:_make_worker() defaults poll_interval and poll_max_interval to None and passes them into WorkerProcess.
  2. WorkerProcess.run() assigns them to the backend (backend.poll_interval = self.poll_interval), so the backend's poll options become None.
  3. RedisTaskBackend.acquire() computes int(self.poll_max_interval / self.poll_interval), which raises TypeError: 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.

Lingua principale
Python
Stelle
12
Fork
1
Merge medio
19h 11m
PR unite (30g)
12

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di codingjoe/threadmill

Tutte le issue di codingjoe/threadmill

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.