feat: add boards and tasks management endpoints
This commit is contained in:
0
backend/app/workers/__init__.py
Normal file
0
backend/app/workers/__init__.py
Normal file
14
backend/app/workers/queue.py
Normal file
14
backend/app/workers/queue.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from redis import Redis
|
||||
from rq import Queue
|
||||
|
||||
from app.core.config import settings
|
||||
|
||||
|
||||
def get_redis() -> Redis:
|
||||
return Redis.from_url(settings.redis_url)
|
||||
|
||||
|
||||
def get_queue(name: str) -> Queue:
|
||||
return Queue(name, connection=get_redis())
|
||||
Reference in New Issue
Block a user