mirror of
https://github.com/langgenius/dify.git
synced 2026-02-11 19:00:44 -05:00
17 lines
438 B
Python
17 lines
438 B
Python
from abc import ABC, abstractmethod
|
|
|
|
from core.sandbox.sandbox import Sandbox
|
|
|
|
|
|
class SandboxInitializer(ABC):
|
|
@abstractmethod
|
|
def initialize(self, sandbox: Sandbox) -> None: ...
|
|
|
|
|
|
class SyncSandboxInitializer(SandboxInitializer):
|
|
"""Marker class for initializers that must run before async setup."""
|
|
|
|
|
|
class AsyncSandboxInitializer(SandboxInitializer):
|
|
"""Marker class for initializers that can run in the background."""
|