Skip to content

Commit

Permalink
update celery app import (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur authored Nov 25, 2024
1 parent 2fa1f84 commit c93e349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion papermerge/core/features/document_types/db/api.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import logging
import uuid

from celery.app import default_app as celery_app

from sqlalchemy import select, func
from sqlalchemy.orm import Session

from papermerge.celery_app import app as celery_app
from papermerge.core.schemas.common import PaginatedResponse
from papermerge.core import schema
from papermerge.core import constants as const
Expand Down
6 changes: 2 additions & 4 deletions papermerge/core/features/nodes/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from fastapi import APIRouter, Depends, HTTPException, Query, Security
from sqlalchemy.exc import NoResultFound, IntegrityError

from papermerge.celery_app import app as current_app
from papermerge.celery_app import app as celery_app
from papermerge.core import utils, schema, config
from papermerge.core.features.auth import get_current_user
from papermerge.core.features.auth import scopes
Expand Down Expand Up @@ -418,6 +418,4 @@ def remove_node_tags(
@if_redis_present
def _notify_index(node_id: uuid.UUID):
id_as_str = str(node_id) # just in case, make sure it is str
current_app.send_task(
INDEX_ADD_NODE, kwargs={"node_id": id_as_str}, route_name="i3"
)
celery_app.send_task(INDEX_ADD_NODE, kwargs={"node_id": id_as_str}, route_name="i3")

0 comments on commit c93e349

Please sign in to comment.