mirror of
https://github.com/langgenius/dify.git
synced 2026-04-26 18:27:15 +08:00
Merge remote-tracking branch 'origin/main' into feat/trigger
This commit is contained in:
commit
fa5765ae82
5
.github/workflows/style.yml
vendored
5
.github/workflows/style.yml
vendored
@ -103,6 +103,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
pnpm run lint
|
pnpm run lint
|
||||||
|
|
||||||
|
- name: Web type check
|
||||||
|
if: steps.changed-files.outputs.any_changed == 'true'
|
||||||
|
working-directory: ./web
|
||||||
|
run: pnpm run type-check
|
||||||
|
|
||||||
docker-compose-template:
|
docker-compose-template:
|
||||||
name: Docker Compose Template
|
name: Docker Compose Template
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -100,6 +100,7 @@ __pypackages__/
|
|||||||
|
|
||||||
# Celery stuff
|
# Celery stuff
|
||||||
celerybeat-schedule
|
celerybeat-schedule
|
||||||
|
celerybeat-schedule.db
|
||||||
celerybeat.pid
|
celerybeat.pid
|
||||||
|
|
||||||
# SageMath parsed files
|
# SageMath parsed files
|
||||||
|
|||||||
2
.vscode/launch.json.template
vendored
2
.vscode/launch.json.template
vendored
@ -40,7 +40,7 @@
|
|||||||
"-c",
|
"-c",
|
||||||
"1",
|
"1",
|
||||||
"-Q",
|
"-Q",
|
||||||
"dataset,generation,mail,ops_trace",
|
"dataset,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,priority_pipeline,pipeline",
|
||||||
"--loglevel",
|
"--loglevel",
|
||||||
"INFO"
|
"INFO"
|
||||||
],
|
],
|
||||||
|
|||||||
2
api/.vscode/launch.json.example
vendored
2
api/.vscode/launch.json.example
vendored
@ -54,7 +54,7 @@
|
|||||||
"--loglevel",
|
"--loglevel",
|
||||||
"DEBUG",
|
"DEBUG",
|
||||||
"-Q",
|
"-Q",
|
||||||
"dataset,generation,mail,ops_trace,app_deletion,workflow"
|
"dataset,priority_pipeline,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow,schedule_poller,schedule_executor,triggered_workflow_dispatcher,trigger_refresh_executor"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -80,7 +80,7 @@
|
|||||||
1. If you need to handle and debug the async tasks (e.g. dataset importing and documents indexing), please start the worker service.
|
1. If you need to handle and debug the async tasks (e.g. dataset importing and documents indexing), please start the worker service.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run celery -A app.celery worker -P gevent -c 2 --loglevel INFO -Q dataset,priority_pipeline,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation
|
uv run celery -A app.celery worker -P gevent -c 2 --loglevel INFO -Q dataset,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,priority_pipeline,pipeline
|
||||||
```
|
```
|
||||||
|
|
||||||
Additionally, if you want to debug the celery scheduled tasks, you can run the following command in another terminal to start the beat service:
|
Additionally, if you want to debug the celery scheduled tasks, you can run the following command in another terminal to start the beat service:
|
||||||
|
|||||||
@ -66,13 +66,7 @@ class APIBasedExtensionAPI(Resource):
|
|||||||
@account_initialization_required
|
@account_initialization_required
|
||||||
@marshal_with(api_based_extension_fields)
|
@marshal_with(api_based_extension_fields)
|
||||||
def post(self):
|
def post(self):
|
||||||
parser = (
|
args = api.payload
|
||||||
reqparse.RequestParser()
|
|
||||||
.add_argument("name", type=str, required=True, location="json")
|
|
||||||
.add_argument("api_endpoint", type=str, required=True, location="json")
|
|
||||||
.add_argument("api_key", type=str, required=True, location="json")
|
|
||||||
)
|
|
||||||
args = parser.parse_args()
|
|
||||||
_, current_tenant_id = current_account_with_tenant()
|
_, current_tenant_id = current_account_with_tenant()
|
||||||
|
|
||||||
extension_data = APIBasedExtension(
|
extension_data = APIBasedExtension(
|
||||||
@ -125,13 +119,7 @@ class APIBasedExtensionDetailAPI(Resource):
|
|||||||
|
|
||||||
extension_data_from_db = APIBasedExtensionService.get_with_tenant_id(current_tenant_id, api_based_extension_id)
|
extension_data_from_db = APIBasedExtensionService.get_with_tenant_id(current_tenant_id, api_based_extension_id)
|
||||||
|
|
||||||
parser = (
|
args = api.payload
|
||||||
reqparse.RequestParser()
|
|
||||||
.add_argument("name", type=str, required=True, location="json")
|
|
||||||
.add_argument("api_endpoint", type=str, required=True, location="json")
|
|
||||||
.add_argument("api_key", type=str, required=True, location="json")
|
|
||||||
)
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
extension_data_from_db.name = args["name"]
|
extension_data_from_db.name = args["name"]
|
||||||
extension_data_from_db.api_endpoint = args["api_endpoint"]
|
extension_data_from_db.api_endpoint = args["api_endpoint"]
|
||||||
|
|||||||
@ -171,6 +171,7 @@ def _extract_text_by_file_extension(*, file_content: bytes, file_extension: str)
|
|||||||
".txt"
|
".txt"
|
||||||
| ".markdown"
|
| ".markdown"
|
||||||
| ".md"
|
| ".md"
|
||||||
|
| ".mdx"
|
||||||
| ".html"
|
| ".html"
|
||||||
| ".htm"
|
| ".htm"
|
||||||
| ".xml"
|
| ".xml"
|
||||||
|
|||||||
@ -34,10 +34,10 @@ if [[ "${MODE}" == "worker" ]]; then
|
|||||||
if [[ -z "${CELERY_QUEUES}" ]]; then
|
if [[ -z "${CELERY_QUEUES}" ]]; then
|
||||||
if [[ "${EDITION}" == "CLOUD" ]]; then
|
if [[ "${EDITION}" == "CLOUD" ]]; then
|
||||||
# Cloud edition: separate queues for dataset and trigger tasks
|
# Cloud edition: separate queues for dataset and trigger tasks
|
||||||
DEFAULT_QUEUES="dataset,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow_professional,workflow_team,workflow_sandbox,schedule_poller,schedule_executor,triggered_workflow_dispatcher,trigger_refresh_executor"
|
DEFAULT_QUEUES="dataset,priority_pipeline,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow_professional,workflow_team,workflow_sandbox,schedule_poller,schedule_executor,triggered_workflow_dispatcher,trigger_refresh_executor"
|
||||||
else
|
else
|
||||||
# Community edition (SELF_HOSTED): dataset, pipeline and workflow have separate queues
|
# Community edition (SELF_HOSTED): dataset, pipeline and workflow have separate queues
|
||||||
DEFAULT_QUEUES="dataset,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow,schedule_poller,schedule_executor,triggered_workflow_dispatcher,trigger_refresh_executor"
|
DEFAULT_QUEUES="dataset,priority_pipeline,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow,schedule_poller,schedule_executor,triggered_workflow_dispatcher,trigger_refresh_executor"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
DEFAULT_QUEUES="${CELERY_QUEUES}"
|
DEFAULT_QUEUES="${CELERY_QUEUES}"
|
||||||
|
|||||||
@ -360,7 +360,7 @@ class TestWorkflowResponseConverterServiceApiTruncation:
|
|||||||
app_id="test_app_id",
|
app_id="test_app_id",
|
||||||
app_config=app_config,
|
app_config=app_config,
|
||||||
tenant_id="test_tenant",
|
tenant_id="test_tenant",
|
||||||
app_mode="workflow",
|
app_mode=AppMode.WORKFLOW,
|
||||||
invoke_from=invoke_from,
|
invoke_from=invoke_from,
|
||||||
inputs={"test_input": "test_value"},
|
inputs={"test_input": "test_value"},
|
||||||
user_id="test_user_id",
|
user_id="test_user_id",
|
||||||
|
|||||||
@ -26,12 +26,16 @@ show_help() {
|
|||||||
echo " workflow_sandbox - Sandbox tier workflows (cloud edition)"
|
echo " workflow_sandbox - Sandbox tier workflows (cloud edition)"
|
||||||
echo " schedule_poller - Schedule polling tasks"
|
echo " schedule_poller - Schedule polling tasks"
|
||||||
echo " schedule_executor - Schedule execution tasks"
|
echo " schedule_executor - Schedule execution tasks"
|
||||||
echo " generation - Content generation tasks"
|
|
||||||
echo " mail - Email notifications"
|
echo " mail - Email notifications"
|
||||||
echo " ops_trace - Operations tracing"
|
echo " ops_trace - Operations tracing"
|
||||||
echo " app_deletion - Application cleanup"
|
echo " app_deletion - Application cleanup"
|
||||||
echo " plugin - Plugin operations"
|
echo " plugin - Plugin operations"
|
||||||
echo " workflow_storage - Workflow storage tasks"
|
echo " workflow_storage - Workflow storage tasks"
|
||||||
|
echo " conversation - Conversation tasks"
|
||||||
|
echo " priority_pipeline - High priority pipeline tasks"
|
||||||
|
echo " pipeline - Standard pipeline tasks"
|
||||||
|
echo " triggered_workflow_dispatcher - Trigger dispatcher tasks"
|
||||||
|
echo " trigger_refresh_executor - Trigger refresh tasks"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
@ -81,10 +85,10 @@ if [[ -z "${QUEUES}" ]]; then
|
|||||||
# Configure queues based on edition
|
# Configure queues based on edition
|
||||||
if [[ "${EDITION}" == "CLOUD" ]]; then
|
if [[ "${EDITION}" == "CLOUD" ]]; then
|
||||||
# Cloud edition: separate queues for dataset and trigger tasks
|
# Cloud edition: separate queues for dataset and trigger tasks
|
||||||
QUEUES="dataset,generation,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow_professional,workflow_team,workflow_sandbox,schedule_poller,schedule_executor,priority_pipeline,pipeline"
|
QUEUES="dataset,priority_pipeline,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow_professional,workflow_team,workflow_sandbox,schedule_poller,schedule_executor,triggered_workflow_dispatcher,trigger_refresh_executor"
|
||||||
else
|
else
|
||||||
# Community edition (SELF_HOSTED): dataset and workflow have separate queues
|
# Community edition (SELF_HOSTED): dataset and workflow have separate queues
|
||||||
QUEUES="dataset,generation,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow,schedule_poller,schedule_executor,priority_pipeline,pipeline"
|
QUEUES="dataset,priority_pipeline,pipeline,mail,ops_trace,app_deletion,plugin,workflow_storage,conversation,workflow,schedule_poller,schedule_executor,triggered_workflow_dispatcher,trigger_refresh_executor"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "No queues specified, using edition-based defaults: ${QUEUES}"
|
echo "No queues specified, using edition-based defaults: ${QUEUES}"
|
||||||
|
|||||||
@ -1258,6 +1258,7 @@ MARKETPLACE_ENABLED=true
|
|||||||
MARKETPLACE_API_URL=https://marketplace.dify.ai
|
MARKETPLACE_API_URL=https://marketplace.dify.ai
|
||||||
|
|
||||||
FORCE_VERIFYING_SIGNATURE=true
|
FORCE_VERIFYING_SIGNATURE=true
|
||||||
|
ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES=true
|
||||||
|
|
||||||
PLUGIN_STDIO_BUFFER_SIZE=1024
|
PLUGIN_STDIO_BUFFER_SIZE=1024
|
||||||
PLUGIN_STDIO_MAX_BUFFER_SIZE=5242880
|
PLUGIN_STDIO_MAX_BUFFER_SIZE=5242880
|
||||||
|
|||||||
@ -548,6 +548,7 @@ x-shared-env: &shared-api-worker-env
|
|||||||
MARKETPLACE_ENABLED: ${MARKETPLACE_ENABLED:-true}
|
MARKETPLACE_ENABLED: ${MARKETPLACE_ENABLED:-true}
|
||||||
MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai}
|
MARKETPLACE_API_URL: ${MARKETPLACE_API_URL:-https://marketplace.dify.ai}
|
||||||
FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
|
FORCE_VERIFYING_SIGNATURE: ${FORCE_VERIFYING_SIGNATURE:-true}
|
||||||
|
ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES: ${ENFORCE_LANGGENIUS_PLUGIN_SIGNATURES:-true}
|
||||||
PLUGIN_STDIO_BUFFER_SIZE: ${PLUGIN_STDIO_BUFFER_SIZE:-1024}
|
PLUGIN_STDIO_BUFFER_SIZE: ${PLUGIN_STDIO_BUFFER_SIZE:-1024}
|
||||||
PLUGIN_STDIO_MAX_BUFFER_SIZE: ${PLUGIN_STDIO_MAX_BUFFER_SIZE:-5242880}
|
PLUGIN_STDIO_MAX_BUFFER_SIZE: ${PLUGIN_STDIO_MAX_BUFFER_SIZE:-5242880}
|
||||||
PLUGIN_PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120}
|
PLUGIN_PYTHON_ENV_INIT_TIMEOUT: ${PLUGIN_PYTHON_ENV_INIT_TIMEOUT:-120}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user