1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-25 23:21:41 +03:00

Merge remote-tracking branch 'origin/v3.0'

This commit is contained in:
Adolfo Gómez García 2021-03-11 14:27:57 +01:00
commit e517281c6a
2 changed files with 5 additions and 2 deletions

View File

@ -146,9 +146,9 @@ class Environment:
It will not make environment persistent
"""
env = Environment(TEMP_ENV)
env.storage.delete(TEMP_ENV)
env.storage.clean()
env.cache.clean()
return Environment(TEMP_ENV)
return env
@staticmethod
def getGlobalEnv() -> 'Environment':

View File

@ -389,6 +389,9 @@ class Storage:
for v in self.filter(attr1, forUpdate):
yield (v[0], pickle.loads(v[1]), v[2])
def clean(self):
self.delete(self._owner)
@staticmethod
def delete(owner: str) -> None:
DBStorage.objects.filter(owner=owner).delete()