api_server: fix flake8 warnings and implement missing methods
This commit is contained in:
parent
2df0377832
commit
a92f0c2125
@ -53,7 +53,8 @@ class ApiServerSuperWrap(RPC):
|
|||||||
logger.info('Starting HTTP Server at {}:{}'.format(rest_ip, rest_port))
|
logger.info('Starting HTTP Server at {}:{}'.format(rest_ip, rest_port))
|
||||||
if not IPv4Address(rest_ip).is_loopback:
|
if not IPv4Address(rest_ip).is_loopback:
|
||||||
logger.info("SECURITY WARNING - Local Rest Server listening to external connections")
|
logger.info("SECURITY WARNING - Local Rest Server listening to external connections")
|
||||||
logger.info("SECURITY WARNING - This is insecure please set to your loopback, e.g 127.0.0.1 in config.json")
|
logger.info("SECURITY WARNING - This is insecure please set to your loopback,"
|
||||||
|
"e.g 127.0.0.1 in config.json")
|
||||||
|
|
||||||
# Run the Server
|
# Run the Server
|
||||||
logger.info('Starting Local Rest Server')
|
logger.info('Starting Local Rest Server')
|
||||||
@ -62,10 +63,24 @@ class ApiServerSuperWrap(RPC):
|
|||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("Api server failed to start, exception message is:")
|
logger.exception("Api server failed to start, exception message is:")
|
||||||
|
|
||||||
|
def cleanup(self) -> None:
|
||||||
|
# TODO: implement me
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@property
|
||||||
|
def name(self) -> str:
|
||||||
|
# TODO: implement me
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def send_msg(self, msg: str) -> None:
|
||||||
|
# TODO: implement me
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Define the application methods here, called by app.add_url_rule
|
Define the application methods here, called by app.add_url_rule
|
||||||
each Telegram command should have a like local substitute
|
each Telegram command should have a like local substitute
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def hello(self):
|
def hello(self):
|
||||||
# For simple rest server testing via browser
|
# For simple rest server testing via browser
|
||||||
# cmds = 'Try uri:/daily?timescale=7 /profit /balance /status
|
# cmds = 'Try uri:/daily?timescale=7 /profit /balance /status
|
||||||
|
Loading…
Reference in New Issue
Block a user