Fix retries for creating MQTT clients

#10
Acceleration Consortium org
edited Mar 5

@sgbaird

We have some sections where we proceed even if the MQTT connection fails. I think the argument could be made that we shouldn't even pass the initialization (before the demo.queue.launch without ensuring the connection succeeds.

This is related to https://huggingface.co/spaces/AccelerationConsortium/bambu-a1-mini/discussions/8 where the Bambu MQTT client fails to connect. Although right now we are retrying, we are letting it publish and subscribe despite an unsuccessful connection.

In this draft I've modified get_data so that we retry the connection a finite number of times and serve stale data if it still fails. Interested in hearing your thoughts.

j-woo changed pull request status to open
Acceleration Consortium org

Agreed, some issues with this repo: a bunch of silent failures or other places that should throw real errors and not continue. Pretend data that makes it seem like it's working when it's not actually (even set by default in some cases). If you have time, would be great if you could do an overhaul.

Cannot merge
This branch has merge conflicts in the following files:
  • app.py

Sign up or log in to comment