Skip to content

Commit

Permalink
[resotocore][fix] Do not create snapshot jobs when scheduling is disa…
Browse files Browse the repository at this point in the history
…bled (#1818)
  • Loading branch information
aquamatthias authored Nov 8, 2023
1 parent 2e27864 commit 5099152
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions resotocore/resotocore/core_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,10 @@ class CoreConfig(ConfigObject):
def multi_tenant_setup(self) -> bool:
return cast(bool, self.args.multi_tenant_setup)

@property
def no_scheduling(self) -> bool:
return cast(bool, self.args.no_scheduling)

@property
def editable(self) -> "EditableConfig":
return EditableConfig(self.api, self.cli, self.graph_update, self.runtime, self.workflows)
Expand Down
2 changes: 1 addition & 1 deletion resotocore/resotocore/graph_manager/graph_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async def _on_config_updated(self, config_id: str) -> None:

async def start(self) -> None:
self.lock = Lock()
if not self.config.multi_tenant_setup:
if not self.config.multi_tenant_setup and not self.config.no_scheduling:
# initialize the snapshot schedule
await self._on_config_updated(ResotoCoreSnapshotsConfigId)
await self.__setup_cleanup_old_snapshots_worker(self.config.snapshots)
Expand Down

0 comments on commit 5099152

Please sign in to comment.