mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
Merge branch 'main' into deploy/dev
# Conflicts: # api/core/app/apps/advanced_chat/app_runner.py # api/core/app/apps/pipeline/pipeline_generator.py # api/core/entities/mcp_provider.py # api/core/helper/marketplace.py # api/models/workflow.py # api/services/tools/tools_transform_service.py # api/tasks/document_indexing_task.py # api/tests/test_containers_integration_tests/core/__init__.py # api/tests/test_containers_integration_tests/tasks/test_document_indexing_task.py # dev/start-worker # docker/.env.example # web/app/components/base/chat/embedded-chatbot/hooks.tsx # web/app/components/workflow/hooks/use-workflow.ts # web/app/components/workflow/nodes/_base/components/workflow-panel/index.tsx # web/global.d.ts # web/pnpm-lock.yaml # web/service/use-plugins.ts
This commit is contained in:
@ -9,6 +9,7 @@ from configs import dify_config
|
||||
from core.entities.document_task import DocumentTask
|
||||
from core.indexing_runner import DocumentIsPausedError, IndexingRunner
|
||||
from core.rag.pipeline.queue import TenantSelfTaskQueue
|
||||
from enums.cloud_plan import CloudPlan
|
||||
from extensions.ext_database import db
|
||||
from libs.datetime_utils import naive_utc_now
|
||||
from models.dataset import Dataset, Document
|
||||
@ -57,7 +58,7 @@ def _document_indexing(dataset_id: str, document_ids: list):
|
||||
vector_space = features.vector_space
|
||||
count = len(document_ids)
|
||||
batch_upload_limit = int(dify_config.BATCH_UPLOAD_LIMIT)
|
||||
if features.billing.subscription.plan == "sandbox" and count > 1:
|
||||
if features.billing.subscription.plan == CloudPlan.SANDBOX and count > 1:
|
||||
raise ValueError("Your current plan does not support batch upload, please upgrade your plan.")
|
||||
if count > batch_upload_limit:
|
||||
raise ValueError(f"You have reached the batch upload limit of {batch_upload_limit}.")
|
||||
|
||||
Reference in New Issue
Block a user