feat: initialize aivideo project
This commit is contained in:
10
backend/app/workers/celery_app.py
Normal file
10
backend/app/workers/celery_app.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from celery import Celery
|
||||
|
||||
from app.common.config.settings import get_settings
|
||||
|
||||
|
||||
settings = get_settings()
|
||||
|
||||
celery_app = Celery("aivideo", broker=settings.redis_url, backend=settings.redis_url)
|
||||
celery_app.conf.task_always_eager = settings.celery_task_always_eager
|
||||
|
||||
7
backend/app/workers/tasks_video_finalize.py
Normal file
7
backend/app/workers/tasks_video_finalize.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from app.workers.celery_app import celery_app
|
||||
|
||||
|
||||
@celery_app.task(name="video.finalize")
|
||||
def finalize_video_task(task_id: int) -> int:
|
||||
return task_id
|
||||
|
||||
7
backend/app/workers/tasks_video_poll.py
Normal file
7
backend/app/workers/tasks_video_poll.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from app.workers.celery_app import celery_app
|
||||
|
||||
|
||||
@celery_app.task(name="video.poll")
|
||||
def poll_video_task(task_id: int) -> int:
|
||||
return task_id
|
||||
|
||||
7
backend/app/workers/tasks_video_submit.py
Normal file
7
backend/app/workers/tasks_video_submit.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from app.workers.celery_app import celery_app
|
||||
|
||||
|
||||
@celery_app.task(name="video.submit")
|
||||
def submit_video_task(task_id: int) -> int:
|
||||
return task_id
|
||||
|
||||
Reference in New Issue
Block a user