Do not retry OpenMHz uploads for configuration errors #1070
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This addresses a bug where OpenMHz configuration errors (invalid API keys, incorrect system IDs, bad filenames, ignored talkgroups) will return a call to the retry queue instead of skipping and moving on.
In the event of an upload failure, the plugin will parse the reply from the server and compare it against a list of select errors that will not require further handling. All other errors (such as connection issues) will return the call to the retry queue.
This is a helpful change because the OpenMHz admin panel includes a configuration option for
Ignore Unknown Talkgroups. Should that option be enabled, Trunk Recorder presently retries a call from an unknown talkgroup until it reaches the maximum number of attempts. The broadcastify plugin uses a similar form of error handling to determine thatSKIPPEDorREJECTEDcalls need not be reattempted.Preventing these calls from being reattempted will reduce some load on the OpenMHz API, and ensure that temporary files on the local device are cleaned up without lingering another ~6 minutes until
MAX_RETRY.