diff --git a/streamflow/core/persistence.py b/streamflow/core/persistence.py index 2d86a4bd4..74f63c80c 100644 --- a/streamflow/core/persistence.py +++ b/streamflow/core/persistence.py @@ -286,8 +286,8 @@ async def update_command( ... @abstractmethod - async def update_config( - self, config_id: int, updates: MutableMapping[str, Any] + async def update_deployment( + self, deployment_id: int, updates: MutableMapping[str, Any] ) -> int: ... diff --git a/streamflow/persistence/base.py b/streamflow/persistence/base.py index b97471584..4fca0eb9b 100644 --- a/streamflow/persistence/base.py +++ b/streamflow/persistence/base.py @@ -10,7 +10,7 @@ class CachedDatabase(Database, ABC): def __init__(self, context: StreamFlowContext): super().__init__(context) - self.config_cache: Cache = LRUCache(maxsize=sys.maxsize) + self.deployment_cache: Cache = LRUCache(maxsize=sys.maxsize) self.port_cache: Cache = LRUCache(maxsize=sys.maxsize) self.step_cache: Cache = LRUCache(maxsize=sys.maxsize) self.target_cache: Cache = LRUCache(maxsize=sys.maxsize) diff --git a/streamflow/persistence/schemas/sqlite.sql b/streamflow/persistence/schemas/sqlite.sql index 89683ce31..7c09b01ff 100644 --- a/streamflow/persistence/schemas/sqlite.sql +++ b/streamflow/persistence/schemas/sqlite.sql @@ -78,14 +78,15 @@ CREATE TABLE IF NOT EXISTS provenance ); -CREATE TABLE IF NOT EXISTS config +CREATE TABLE IF NOT EXISTS deployment ( - id INTEGER PRIMARY KEY, - name TEXT, - attr_type TEXT, - config TEXT, - type TEXT, - params TEXT + id INTEGER PRIMARY KEY, + name TEXT, + type TEXT, + config TEXT, + external INTEGER, + lazy INTEGER, + workdir TEXT );