mirror of
https://github.com/langgenius/dify.git
synced 2026-02-12 22:14:59 +08:00
Some checks are pending
autofix.ci / autofix (push) Waiting to run
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/amd64, build-api-amd64) (push) Waiting to run
Build and Push API & Web / build (api, DIFY_API_IMAGE_NAME, linux/arm64, build-api-arm64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/amd64, build-web-amd64) (push) Waiting to run
Build and Push API & Web / build (web, DIFY_WEB_IMAGE_NAME, linux/arm64, build-web-arm64) (push) Waiting to run
Build and Push API & Web / create-manifest (api, DIFY_API_IMAGE_NAME, merge-api-images) (push) Blocked by required conditions
Build and Push API & Web / create-manifest (web, DIFY_WEB_IMAGE_NAME, merge-web-images) (push) Blocked by required conditions
Main CI Pipeline / Check Changed Files (push) Waiting to run
Main CI Pipeline / API Tests (push) Blocked by required conditions
Main CI Pipeline / Web Tests (push) Blocked by required conditions
Main CI Pipeline / Style Check (push) Waiting to run
Main CI Pipeline / VDB Tests (push) Blocked by required conditions
Main CI Pipeline / DB Migration Test (push) Blocked by required conditions
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
22 lines
843 B
Python
22 lines
843 B
Python
"""
|
|
Celery tasks for asynchronous workflow execution storage operations.
|
|
|
|
These tasks provide asynchronous storage capabilities for workflow execution data,
|
|
improving performance by offloading storage operations to background workers.
|
|
"""
|
|
|
|
from celery import shared_task # type: ignore[import-untyped]
|
|
|
|
from core.db.session_factory import session_factory
|
|
from services.workflow_draft_variable_service import DraftVarFileDeletion, WorkflowDraftVariableService
|
|
|
|
|
|
@shared_task(queue="workflow_draft_var", bind=True, max_retries=3, default_retry_delay=60)
|
|
def save_workflow_execution_task(
|
|
self,
|
|
deletions: list[DraftVarFileDeletion],
|
|
):
|
|
with session_factory.create_session() as session, session.begin():
|
|
srv = WorkflowDraftVariableService(session=session)
|
|
srv.delete_workflow_draft_variable_file(deletions=deletions)
|