mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Saving actor config for non-persistent machines
This is necessary to leave a non-persistent machine from the domain.
This commit is contained in:
parent
d6e2373de4
commit
2d30362301
@ -194,10 +194,15 @@ class CommonService: # pylint: disable=too-many-instance-attributes
|
||||
|
||||
# Cleans sensible data
|
||||
if self._cfg.config:
|
||||
self._cfg = self._cfg._replace(
|
||||
config=self._cfg.config._replace(os=None), data=None
|
||||
)
|
||||
platform.store.writeConfig(self._cfg)
|
||||
try:
|
||||
isPersistent = self._cfg.config.os.isPersistent == 'y'
|
||||
except:
|
||||
isPersistent = True
|
||||
if isPersistent:
|
||||
self._cfg = self._cfg._replace(
|
||||
config=self._cfg.config._replace(os=None), data=None
|
||||
)
|
||||
platform.store.writeConfig(self._cfg)
|
||||
|
||||
logger.info('Service ready')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user