forked from Dniel97/artemis
add mucha config to coreconfig
This commit is contained in:
parent
b343228072
commit
3f40e083ce
@ -194,6 +194,7 @@ class CoreConfig(dict):
|
|||||||
self.allnet = AllnetConfig(self)
|
self.allnet = AllnetConfig(self)
|
||||||
self.billing = BillingConfig(self)
|
self.billing = BillingConfig(self)
|
||||||
self.aimedb = AimedbConfig(self)
|
self.aimedb = AimedbConfig(self)
|
||||||
|
self.mucha = MuchaConfig(self)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def str_to_loglevel(cls, level_str: str):
|
def str_to_loglevel(cls, level_str: str):
|
||||||
|
@ -35,9 +35,14 @@ class MuchaServlet:
|
|||||||
return b""
|
return b""
|
||||||
|
|
||||||
req = MuchaAuthRequest(req_dict)
|
req = MuchaAuthRequest(req_dict)
|
||||||
self.logger.info(f"Mucha request {vars(req)}")
|
self.logger.debug(f"Mucha request {vars(req)}")
|
||||||
resp = MuchaAuthResponse(mucha_url=f"{self.config.mucha.hostname}:{self.config.mucha.port}")
|
|
||||||
self.logger.info(f"Mucha response {vars(resp)}")
|
if self.config.server.is_develop:
|
||||||
|
resp = MuchaAuthResponse(mucha_url=f"{self.config.mucha.hostname}:{self.config.mucha.port}")
|
||||||
|
else:
|
||||||
|
resp = MuchaAuthResponse(mucha_url=f"{self.config.mucha.hostname}")
|
||||||
|
|
||||||
|
self.logger.debug(f"Mucha response {vars(resp)}")
|
||||||
|
|
||||||
return self.mucha_postprocess(vars(resp))
|
return self.mucha_postprocess(vars(resp))
|
||||||
|
|
||||||
@ -48,9 +53,14 @@ class MuchaServlet:
|
|||||||
return b""
|
return b""
|
||||||
|
|
||||||
req = MuchaUpdateRequest(req_dict)
|
req = MuchaUpdateRequest(req_dict)
|
||||||
self.logger.info(f"Mucha request {vars(req)}")
|
self.logger.debug(f"Mucha request {vars(req)}")
|
||||||
resp = MuchaUpdateResponse(mucha_url=f"{self.config.mucha.hostname}:{self.config.mucha.port}")
|
|
||||||
self.logger.info(f"Mucha response {vars(resp)}")
|
if self.config.server.is_develop:
|
||||||
|
resp = MuchaUpdateResponse(mucha_url=f"{self.config.mucha.hostname}:{self.config.mucha.port}")
|
||||||
|
else:
|
||||||
|
resp = MuchaUpdateResponse(mucha_url=f"{self.config.mucha.hostname}")
|
||||||
|
|
||||||
|
self.logger.debug(f"Mucha response {vars(resp)}")
|
||||||
|
|
||||||
return self.mucha_postprocess(vars(resp))
|
return self.mucha_postprocess(vars(resp))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user