Improved hosting

This commit is contained in:
2020-11-26 11:20:21 +01:00
parent 5faac76c32
commit ead0eae5f0
19 changed files with 124 additions and 37 deletions

View File

@@ -1,17 +1,29 @@
from datetime import datetime
from sh_edraft.hosting.base.application_host_base import ApplicationHostBase
from sh_edraft.hosting.base.environment_base import EnvironmentBase
from sh_edraft.service.service_provider import ServiceProvider
class ApplicationHost(ApplicationHostBase):
def __init__(self):
def __init__(self, name: str, env: EnvironmentBase):
ApplicationHostBase.__init__(self)
self._services = ServiceProvider()
self._name: str = name
self._environment: EnvironmentBase = env
self._services = ServiceProvider(self)
self._start_time: datetime = datetime.now()
self._end_time: datetime = datetime.now()
@property
def name(self) -> str:
return self._name
@property
def environment(self) -> EnvironmentBase:
return self._environment
@property
def services(self):
return self._services