mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 10:28:10 +08:00
refactor(sandbox): update sandbox service to use sandbox_id instead of workflow_execution_id
- Modified the SandboxService and related app generators to replace workflow_execution_id with sandbox_id for improved clarity and consistency in sandbox handling. - Adjusted the AdvancedChatAppGenerator and WorkflowAppGenerator to align with the new parameter naming convention.
This commit is contained in:
@ -24,14 +24,14 @@ class SandboxService:
|
||||
tenant_id: str,
|
||||
app_id: str,
|
||||
user_id: str,
|
||||
workflow_execution_id: str,
|
||||
sandbox_id: str,
|
||||
sandbox_provider: SandboxProviderEntity,
|
||||
) -> Sandbox:
|
||||
assets = AppAssetService.get_assets(tenant_id, app_id, user_id, is_draft=False)
|
||||
if not assets:
|
||||
raise ValueError(f"No assets found for tid={tenant_id}, app_id={app_id}")
|
||||
|
||||
archive_storage = ArchiveSandboxStorage(tenant_id, app_id, workflow_execution_id, storage.storage_runner)
|
||||
archive_storage = ArchiveSandboxStorage(tenant_id, app_id, sandbox_id, storage.storage_runner)
|
||||
sandbox = (
|
||||
SandboxBuilder(tenant_id, SandboxType(sandbox_provider.provider_type))
|
||||
.options(sandbox_provider.config)
|
||||
@ -67,8 +67,6 @@ class SandboxService:
|
||||
if not assets:
|
||||
raise ValueError(f"No assets found for tid={tenant_id}, app_id={app_id}")
|
||||
|
||||
SandboxService.delete_draft_storage(tenant_id, app_id, user_id)
|
||||
|
||||
AppAssetPackageService.build_assets(tenant_id, app_id, assets)
|
||||
sandbox_id = SandboxBuilder.draft_id(user_id)
|
||||
archive_storage = ArchiveSandboxStorage(
|
||||
|
||||
Reference in New Issue
Block a user