MetPX / sarracenia

https://MetPX.github.io/sarracenia
GNU General Public License v2.0
46 stars 22 forks source link

Issue339 try5 fail connections in main loop #1295

Closed petersilva closed 1 week ago

petersilva commented 1 week ago

This is a third pass at not looping to retry broker connections in the amqp and mqtt moth drivers. They now attempt to connect once, and have an exponential backoff implementation to that they don't try to connect again too soon.

This is a preparatory change to, in future, being able to work with multiple broker connections, where if one fails the other still works. Without this change, when a failure in one broker happens, it will just loop trying to re-connect to it, and not even look at the available good connection to the other broker.

previous attempts : #1247

The first two patches here are different, in that it was split into two, so that, in the first patch, you see the substantive changes made to getSetup and putSetup (removing the loop, making it return instead.) the second patch, just fixes the indenting and gets rid of the now dead code (mqtt/putSetup was missed on first pass, so both changes combined in second patch for that routine.)

The remainder of the patches implement ebo (exponential back off) of broker connections.

Ran the flow tests... seems fine.

github-actions[bot] commented 1 week ago

Test Results

238 tests   235 ✅  1m 28s ⏱️   1 suites    1 💤   1 files      2 ❌

For more details on these failures, see this check.

Results for commit 0d42a3e8.