mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
feat(trigger): enhance trigger plugin data structure and error handling
- Added `plugin_unique_identifier` to `PluginTriggerData` and `TriggerProviderApiEntity` to improve identification of trigger plugins. - Introduced `PluginTriggerDispatchData` for structured dispatch data in Celery tasks, enhancing the clarity of trigger dispatching. - Updated `dispatch_triggered_workflows_async` to utilize the new dispatch data structure, improving error handling and logging for trigger invocations. - Enhanced metadata handling in `TriggerPluginNode` to include trigger information, aiding in debugging and tracking. These changes improve the robustness and maintainability of trigger plugin interactions within the workflow system.
This commit is contained in:
@ -66,6 +66,7 @@ const TriggerPluginActionItem: FC<Props> = ({
|
||||
trigger_name: payload.name,
|
||||
trigger_label: payload.label[language],
|
||||
trigger_description: payload.description[language],
|
||||
plugin_unique_identifier: provider.plugin_unique_identifier,
|
||||
title: payload.label[language],
|
||||
is_team_authorization: provider.is_team_authorization,
|
||||
output_schema: payload.output_schema || {},
|
||||
|
||||
@ -35,11 +35,12 @@ export type TriggerDefaultValue = PluginDefaultValue & {
|
||||
trigger_label: string
|
||||
trigger_description: string
|
||||
title: string
|
||||
plugin_unique_identifier: string
|
||||
is_team_authorization: boolean
|
||||
params: Record<string, any>
|
||||
paramSchemas: Record<string, any>[]
|
||||
output_schema: Record<string, any>
|
||||
credential_id?: string
|
||||
subscription_id?: string
|
||||
meta?: PluginMeta
|
||||
}
|
||||
|
||||
@ -149,7 +150,7 @@ export type TriggerProviderApiEntity = {
|
||||
icon_dark?: string
|
||||
tags: string[]
|
||||
plugin_id?: string
|
||||
plugin_unique_identifier?: string
|
||||
plugin_unique_identifier: string
|
||||
credentials_schema: TriggerCredentialField[]
|
||||
oauth_client_schema: TriggerCredentialField[]
|
||||
subscription_schema: TriggerSubscriptionSchema
|
||||
@ -160,6 +161,7 @@ export type TriggerProviderApiEntity = {
|
||||
export type TriggerWithProvider = Collection & {
|
||||
triggers: Trigger[]
|
||||
meta: PluginMeta
|
||||
plugin_unique_identifier: string
|
||||
credentials_schema?: TriggerCredentialField[]
|
||||
oauth_client_schema?: TriggerCredentialField[]
|
||||
subscription_schema?: TriggerSubscriptionSchema
|
||||
|
||||
Reference in New Issue
Block a user