[RPC] Set custom port with flags (#2429)

* [RPC] Set custom port with flags

* Add changelog entry
This commit is contained in:
El Laggron
2019-10-22 04:46:56 +02:00
committed by Michael H
parent 3b0fa0c05d
commit ee293876d9
5 changed files with 12 additions and 4 deletions

View File

@@ -69,15 +69,15 @@ class RPC:
self._runner = web.AppRunner(self.app)
self._site: Optional[web.TCPSite] = None
async def initialize(self):
async def initialize(self, port: int):
"""
Finalizes the initialization of the RPC server and allows it to begin
accepting queries.
"""
await self._runner.setup()
self._site = web.TCPSite(self._runner, host="127.0.0.1", port=6133)
self._site = web.TCPSite(self._runner, host="127.0.0.1", port=port)
await self._site.start()
log.debug("Created RPC server listener.")
log.debug("Created RPC server listener on port %s", port)
async def close(self):
"""