Skip to content

Commit

Permalink
rename celery_init.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xucai committed Jun 12, 2024
1 parent 3df745d commit ae2ded1
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/api/user/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def upload_remote():
def task_status():
"""Get celery job status."""
task_id = request.args.get("task_id")
from application.celery import celery
from application.celery_init import celery

task = celery.AsyncResult(task_id)
task_meta = task.info
Expand Down
2 changes: 1 addition & 1 deletion application/api/user/tasks.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from application.worker import ingest_worker, remote_worker
from application.celery import celery
from application.celery_init import celery

@celery.task(bind=True)
def ingest(self, directory, formats, name_job, filename, user):
Expand Down
2 changes: 1 addition & 1 deletion application/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import platform
import dotenv
from application.celery import celery
from application.celery_init import celery
from flask import Flask, request, redirect
from application.core.settings import settings
from application.api.user.routes import user
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/test_celery.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from unittest.mock import patch
from application.core.settings import settings
from application.celery import make_celery
from application.celery_init import make_celery


@patch('application.celery.Celery')
Expand Down

0 comments on commit ae2ded1

Please sign in to comment.