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:
commit
e517281c6a
@ -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':
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user