The celery task is not running after invoke #65

Closed
opened 2026-02-21 17:25:51 -05:00 by yindo · 1 comment
Owner

Originally created by @binchen1998 on GitHub (May 20, 2023).

Hi,

I just get the code running at my Ubuntu machine, but it looks like the celery task is not running after be .delay().

Code in data_service.py:

# trigger async task
        document_indexing_task.delay(document.dataset_id, document.id)

will not trigger the code in document_indexing_task.py:

@shared_task
def document_indexing_task(dataset_id: str, document_id: str):
    """
    Async process document
    :param dataset_id:
    :param document_id:

    Usage: document_indexing_task.delay(dataset_id, document_id)
    """
    logging.info(click.style('Start process document: {}'.format(document_id), fg='green'))
    start_at = time.perf_counter()

Did I miss something?

Thanks.

Originally created by @binchen1998 on GitHub (May 20, 2023). Hi, I just get the code running at my Ubuntu machine, but it looks like the celery task is not running after be .delay(). Code in data_service.py: ``` # trigger async task document_indexing_task.delay(document.dataset_id, document.id) ``` will not trigger the code in document_indexing_task.py: ``` @shared_task def document_indexing_task(dataset_id: str, document_id: str): """ Async process document :param dataset_id: :param document_id: Usage: document_indexing_task.delay(dataset_id, document_id) """ logging.info(click.style('Start process document: {}'.format(document_id), fg='green')) start_at = time.perf_counter() ``` Did I miss something? Thanks.
yindo closed this issue 2026-02-21 17:25:51 -05:00
Author
Owner

@takatost commented on GitHub (May 20, 2023):

Sorry, I forgot to mention the command to start celery. I've added it to the Readme now.
https://github.com/langgenius/dify/blob/main/api/README.md

@takatost commented on GitHub (May 20, 2023): Sorry, I forgot to mention the command to start `celery`. I've added it to the Readme now. https://github.com/langgenius/dify/blob/main/api/README.md
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#65