blackified code

Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
Jürgen Eckel 2023-03-31 14:32:32 +02:00
parent 9fc3e597a5
commit 358a4ff027
No known key found for this signature in database
4 changed files with 24 additions and 22 deletions

View File

@ -7,6 +7,7 @@ from planetmint.ipc.events import EventTypes, POISON_PILL
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class Exchange: class Exchange:
"""Dispatch events to subscribers.""" """Dispatch events to subscribers."""
@ -76,4 +77,3 @@ class Exchange:
return return
except Exception as e: except Exception as e:
logger.debug(f"Exchange Exception: {e}") logger.debug(f"Exchange Exception: {e}")

View File

@ -52,6 +52,7 @@ async def access_queue(app):
logger.debug(f"REROUTING Cancelled : {e}") logger.debug(f"REROUTING Cancelled : {e}")
pass pass
async def websocket_tx_handler(request): async def websocket_tx_handler(request):
"""Handle a new socket connection.""" """Handle a new socket connection."""
@ -140,6 +141,7 @@ def init_app(sync_event_source):
app.on_startup.append(start_background_tasks) app.on_startup.append(start_background_tasks)
return app return app
def start(sync_event_source): def start(sync_event_source):
app = init_app(sync_event_source) app = init_app(sync_event_source)
aiohttp.web.run_app(app, host=Config().get()["wsserver"]["host"], port=Config().get()["wsserver"]["port"]) aiohttp.web.run_app(app, host=Config().get()["wsserver"]["host"], port=Config().get()["wsserver"]["port"])