Commit 56dd8725 authored by Dan Jones's avatar Dan Jones
Browse files

Merge branch '39-run-subscribes-on-main-thread' into 'dev'

Resolve "Run subscribes on main thread"

Closes #39

See merge request !19
2 merge requests!23Resolve "Release v0.1.0",!19Resolve "Run subscribes on main thread"
Pipeline #110210 passed with stages
in 59 seconds
...@@ -118,19 +118,12 @@ def run_client(client_id, executor): ...@@ -118,19 +118,12 @@ def run_client(client_id, executor):
) )
THREADS[f"{client_id}-broadcast"] = thread THREADS[f"{client_id}-broadcast"] = thread
# subscribe subscribe(
thread = executor.submit(
subscribe,
f"{client_id}-inbox", f"{client_id}-inbox",
EXCHANGES.get("publish"), EXCHANGES.get("publish"),
client["subscription"], # topic client["subscription"],
)
THREADS[f"{client_id}-inbox-published"] = thread
thread = executor.submit(
subscribe, f"{client_id}-inbox", EXCHANGES.get("broadcast")
) )
THREADS[f"{client_id}-inbox-broadcast"] = thread subscribe(f"{client_id}-inbox", EXCHANGES.get("broadcast"))
if client_id not in RUNNING_CLIENTS: if client_id not in RUNNING_CLIENTS:
RUNNING_CLIENTS.append(client_id) RUNNING_CLIENTS.append(client_id)
running = True running = True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment