Repository navigation
Conversation
The simple usage demo left the pool open, so redis 5.0–5.2 raised RuntimeError after the event loop shut down. Fixes python-arq#480
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #533 +/- ##
==========================================
- Coverage 96.27% 95.85% -0.43%
==========================================
Files 11 11
Lines 1074 1085 +11
Branches 209 144 -65
==========================================
+ Hits 1034 1040 +6
- Misses 19 24 +5
Partials 21 21 see 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
The Python 3.14 / Redis 5 job hits the 10-second pytest timeout while the existing This matches the setup timeout reported in #529, with a CI fix proposed in #530. Could you rerun the failed job so we can check whether the test completes on Python 3.14? |
Summary
The Simple Usage example creates a Redis pool and returns. On redis 5.0 through 5.2,
AbstractConnection.__del__then calls_writer.close()afterasyncio.runhas closed the loop. The process printsRuntimeError: Event loop is closedand exits non-zero.await redis.close()in afinallyblock disconnects those writers first.close()is the methodWorkeralready uses, and it exists acrossredis>=4.2,<6. On redis 5 it forwards toaclose().aclose()itself arrived in redis 5.0.1, so the examples stay runnable on redis 4.x.The other documentation examples that call
create_poolfromasyncio.runclose the pool the same way.Fixes #480
Test plan
docs/examples/main_demo.py,slow_job.py, andretry.pyfinish with noEvent loop is closed.pytest tests/test_pool_shutdown.py(uses the existing testcontainers Redis fixture)