first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
"""Celery worker package."""
|
||||
@@ -0,0 +1,12 @@
|
||||
from celery import Celery
|
||||
|
||||
from app.config import get_settings
|
||||
|
||||
settings = get_settings()
|
||||
|
||||
celery_app = Celery(
|
||||
"radio_api",
|
||||
broker=settings.redis_url,
|
||||
backend=settings.redis_url,
|
||||
include=["app.workers.tasks"],
|
||||
)
|
||||
@@ -0,0 +1,11 @@
|
||||
from app.workers.celery_app import celery_app
|
||||
|
||||
|
||||
@celery_app.task(name="coverage.compute")
|
||||
def compute_coverage(job_id: str) -> dict[str, str]:
|
||||
return {"job_id": job_id, "status": "not_implemented"}
|
||||
|
||||
|
||||
@celery_app.task(name="viewshed.compute")
|
||||
def compute_viewshed(job_id: str) -> dict[str, str]:
|
||||
return {"job_id": job_id, "status": "not_implemented"}
|
||||
Reference in New Issue
Block a user