DocsGPT/application/api/user/tasks.py

13 lines
451 B
Python
Raw Normal View History

2024-02-13 20:41:36 +00:00
from application.worker import ingest_worker, remote_worker
2023-09-27 15:25:57 +00:00
from application.celery import celery
@celery.task(bind=True)
def ingest(self, directory, formats, name_job, filename, user):
resp = ingest_worker(self, directory, formats, name_job, filename, user)
return resp
2024-02-13 20:41:36 +00:00
@celery.task(bind=True)
def ingest_remote(self, source_data, job_name, user, loader):
resp = remote_worker(self, source_data, job_name, user, loader)
return resp