mirror of
https://github.com/langgenius/dify.git
synced 2026-06-11 02:31:13 +08:00
- Add helpers.py with connection management utilities:
- with_connection: context manager for connection lifecycle
- submit_command: execute command and return CommandFuture
- execute: run command with auto connection, raise on failure
- try_execute: run command with auto connection, return result
- Add CommandExecutionError to exec.py for typed error handling
with access to exit_code, stderr, and full result
- Remove run_command method from VirtualEnvironment base class
(now available as submit_command helper)
- Update all call sites to use new helper functions:
- sandbox/session.py
- sandbox/storage/archive_storage.py
- sandbox/bash/bash_tool.py
- workflow/nodes/command/node.py
- Add comprehensive unit tests for helpers with connection reuse
|
||
|---|---|---|
| .. | ||
| agent | ||
| app | ||
| datasource | ||
| file | ||
| helper | ||
| logging | ||
| mcp | ||
| model_runtime | ||
| moderation | ||
| ops | ||
| plugin | ||
| prompt | ||
| rag | ||
| repositories | ||
| schemas | ||
| tools | ||
| variables | ||
| virtual_environment | ||
| workflow | ||
| __init__.py | ||
| test_file.py | ||
| test_model_manager.py | ||
| test_provider_configuration.py | ||
| test_provider_manager.py | ||
| test_trigger_debug_event_selectors.py | ||