refactor: update module docstrings for clarity and consistency
This commit is contained in:
@@ -0,0 +1 @@
|
||||
"""Background worker tasks and queue processing utilities."""
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
"""RQ queue and Redis connection helpers for background workers."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from redis import Redis
|
||||
@@ -7,8 +9,10 @@ from app.core.config import settings
|
||||
|
||||
|
||||
def get_redis() -> Redis:
|
||||
"""Create a Redis client from configured settings."""
|
||||
return Redis.from_url(settings.redis_url)
|
||||
|
||||
|
||||
def get_queue(name: str) -> Queue:
|
||||
"""Return an RQ queue bound to the configured Redis connection."""
|
||||
return Queue(name, connection=get_redis())
|
||||
|
||||
Reference in New Issue
Block a user