-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPO listener client connection and device reassignment #517
Conversation
…er and behaving handling device reassign properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello there syoffe 👋
Thank you for opening your first PR for the Tally Arbiter project!
We will review it soon!
TallyArbiter fosters an open and welcoming environment for all our contributors. Please adhere to our Code Of Conduct.
Hello @MatteoGheza, The automatic build failure for
|
Thanks for the contribution, and sorry for the delay... After taking a quick look at the code, I'll add some reviews. |
@@ -344,7 +346,7 @@ def main(): | |||
while True: | |||
time.sleep(0.1) | |||
else: | |||
server_connect(str(config_object["server_config"]["ip"]), str(config_object["server_config"]["port"])) | |||
server_connect("http://" + str(config_object["server_config"]["ip"]) + ":" + str(config_object["server_config"]["port"])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I forgot to test this condition 🤦🏻
@@ -262,7 +264,7 @@ def on_reassign(oldDeviceId, newDeviceId, gpoGroupId): | |||
gpo_group["deviceId"] = newDeviceId | |||
|
|||
saveConfig() | |||
|
|||
sio.emit('listener_reassign_gpo', (gpoGroupId, oldDeviceId, newDeviceId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We forgot to document this in the code.
We are trying to deprecate the old listener_reassign_gpo
events, migrating to a single event for all the different types of listeners. I'll update this and add some warnings in the codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MatteoGheza, ah no problem, that makes sense. Let me know if I can help test in any way. Part of the problem with the reassign was using the variable listener_clients[I].gpoGroupId
in index.ts
, which should have been listener_clients[i].internalId
. I guess this is part of the migration to a single interface for all devices.
Corrected a few errors preventing the GPO listener client connecting to the server and handling device reassignment properly. Made similar changes to
src/index.ts
for relay listener, too (untested).