mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Handle Matrix process correctly
This commit is contained in:
parent
c1680ed78d
commit
6b0d286391
1 changed files with 14 additions and 12 deletions
|
@ -98,20 +98,20 @@ def run(config_filename: str):
|
||||||
matrix_process = None
|
matrix_process = None
|
||||||
if "Matrix" in config["Serfs"] and config["Serfs"]["Matrix"]["enabled"]:
|
if "Matrix" in config["Serfs"] and config["Serfs"]["Matrix"]["enabled"]:
|
||||||
matrix_process = multiprocessing.Process(name="Serf.Matrix",
|
matrix_process = multiprocessing.Process(name="Serf.Matrix",
|
||||||
target=rsm.MatrixSerf.run_process,
|
target=rsm.MatrixSerf.run_process,
|
||||||
daemon=True,
|
daemon=True,
|
||||||
kwargs={
|
kwargs={
|
||||||
"alchemy_cfg": config["Alchemy"],
|
"alchemy_cfg": config["Alchemy"],
|
||||||
"herald_cfg": herald_cfg,
|
"herald_cfg": herald_cfg,
|
||||||
"packs_cfg": config["Packs"],
|
"packs_cfg": config["Packs"],
|
||||||
"sentry_cfg": config["Sentry"],
|
"sentry_cfg": config["Sentry"],
|
||||||
"logging_cfg": config["Logging"],
|
"logging_cfg": config["Logging"],
|
||||||
"serf_cfg": config["Serfs"]["Matrix"],
|
"serf_cfg": config["Serfs"]["Matrix"],
|
||||||
})
|
})
|
||||||
matrix_process.start()
|
matrix_process.start()
|
||||||
log.info("Serf.Discord: Started")
|
log.info("Serf.Matrix: Started")
|
||||||
else:
|
else:
|
||||||
log.info("Serf.Discord: Disabled")
|
log.info("Serf.Matrix: Disabled")
|
||||||
|
|
||||||
# Constellation
|
# Constellation
|
||||||
constellation_process = None
|
constellation_process = None
|
||||||
|
@ -139,6 +139,8 @@ def run(config_filename: str):
|
||||||
telegram_process.join()
|
telegram_process.join()
|
||||||
if discord_process is not None:
|
if discord_process is not None:
|
||||||
discord_process.join()
|
discord_process.join()
|
||||||
|
if matrix_process is not None:
|
||||||
|
matrix_process.join()
|
||||||
if herald_process is not None:
|
if herald_process is not None:
|
||||||
herald_process.join()
|
herald_process.join()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue