Bugfixes
This commit is contained in:
parent
1c753aaaea
commit
1e0d7d60a5
@ -1,3 +1,4 @@
|
|||||||
|
import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
from sh_edraft.hosting.hosting_environment import HostingEnvironment
|
from sh_edraft.hosting.hosting_environment import HostingEnvironment
|
||||||
@ -9,12 +10,12 @@ from sh_edraft.service.service_provider import ServiceProvider
|
|||||||
|
|
||||||
class ApplicationHost(ApplicationHostBase):
|
class ApplicationHost(ApplicationHostBase):
|
||||||
|
|
||||||
def __init__(self, name: str, args: list[str]):
|
def __init__(self, name: str):
|
||||||
ApplicationHostBase.__init__(self)
|
ApplicationHostBase.__init__(self)
|
||||||
self._name: str = name
|
self._name: str = name
|
||||||
self._environment = HostingEnvironment()
|
self._environment = HostingEnvironment()
|
||||||
|
|
||||||
self._args: list[str] = args
|
self._args: list[str] = sys.argv
|
||||||
self._services = ServiceProvider(self)
|
self._services = ServiceProvider(self)
|
||||||
self._start_time: datetime = datetime.now()
|
self._start_time: datetime = datetime.now()
|
||||||
self._end_time: datetime = datetime.now()
|
self._end_time: datetime = datetime.now()
|
||||||
|
@ -6,7 +6,7 @@ from sh_edraft.hosting.model.environment_name import EnvironmentName
|
|||||||
|
|
||||||
class HostingEnvironment(EnvironmentBase):
|
class HostingEnvironment(EnvironmentBase):
|
||||||
|
|
||||||
def __init__(self, name: EnvironmentName = None, crp: str = None):
|
def __init__(self, name: EnvironmentName = None, crp: str = './'):
|
||||||
EnvironmentBase.__init__(self)
|
EnvironmentBase.__init__(self)
|
||||||
|
|
||||||
self._name: Optional[EnvironmentName] = name
|
self._name: Optional[EnvironmentName] = name
|
||||||
@ -16,6 +16,14 @@ class HostingEnvironment(EnvironmentBase):
|
|||||||
def name(self) -> EnvironmentName:
|
def name(self) -> EnvironmentName:
|
||||||
return self._name
|
return self._name
|
||||||
|
|
||||||
|
@name.setter
|
||||||
|
def name(self, name: EnvironmentName):
|
||||||
|
self._name = name
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def content_root_path(self) -> str:
|
def content_root_path(self) -> str:
|
||||||
return self._content_root_path
|
return self._content_root_path
|
||||||
|
|
||||||
|
@content_root_path.setter
|
||||||
|
def content_root_path(self, content_root_path: str):
|
||||||
|
self._content_root_path = content_root_path
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import sys
|
|
||||||
|
|
||||||
from sh_edraft.hosting import ApplicationHost
|
from sh_edraft.hosting import ApplicationHost
|
||||||
from sh_edraft.hosting.base.application_base import ApplicationBase
|
from sh_edraft.hosting.base.application_base import ApplicationBase
|
||||||
|
|
||||||
@ -9,7 +7,7 @@ class Program(ApplicationBase):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
ApplicationBase.__init__(self)
|
ApplicationBase.__init__(self)
|
||||||
|
|
||||||
self._app_host = ApplicationHost('CPL_DEV_Test', sys.argv)
|
self._app_host = ApplicationHost('CPL_DEV_Test')
|
||||||
self._config = self._app_host.services.config
|
self._config = self._app_host.services.config
|
||||||
self._services = self._app_host.services
|
self._services = self._app_host.services
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user