do not init storage before first used
This commit is contained in:
parent
d9c0b18404
commit
d958b9dfad
|
@ -47,11 +47,13 @@ class Storage:
|
||||||
**kwargs: Dict[str, str]) -> None:
|
**kwargs: Dict[str, str]) -> None:
|
||||||
self.storage_type = None
|
self.storage_type = None
|
||||||
self.mod = None
|
self.mod = None
|
||||||
|
if kwargs:
|
||||||
self.setting(**kwargs)
|
self.setting(**kwargs)
|
||||||
|
|
||||||
def get(self):
|
def get(self):
|
||||||
if self.storage_type is None:
|
if self.storage_type is None:
|
||||||
self.storage_type = environ.get('TIRAMISU_STORAGE', DEFAULT_STORAGE)
|
self.storage_type = environ.get('TIRAMISU_STORAGE', DEFAULT_STORAGE)
|
||||||
|
self.setting()
|
||||||
if self.mod is None:
|
if self.mod is None:
|
||||||
modulepath = '{0}.storage.{1}'.format(MODULE_PATH,
|
modulepath = '{0}.storage.{1}'.format(MODULE_PATH,
|
||||||
self.storage_type)
|
self.storage_type)
|
||||||
|
|
Loading…
Reference in New Issue