-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
feat: Support mutiple *arr servers #1327
Conversation
5fe1d63
to
ab72dec
Compare
Just had a thought that I should reset the caches when a setting has been updated. |
0075916
to
451e331
Compare
Hey, thanks for the great work again! This is a big one, I’ll need some time to process everything. |
Of course 😄 Feel free to hit me up on Discord if you any questions |
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.
I’ve finally gone through the code and didn’t notice anything breaking, though it still needs thorough testing. What’s your opinion on merging it into the dev branch? Do you think it’s not quite ready yet, or are you confident we can move forward?
Personally, I believe we could merge it to dev so others can start testing it as well.
I am fairly confident it works as expected 😄 I'll rebase it tonight and give everything a once over again. |
Plex-api throws its own exceptions for API errors so lets log these. Previously all calls presumed success and you'd get a 'Cannot read properties of undefined' error.
- Add missing awaits - Improve setTimeout usages - Catch and log any exceptions in the controller - Only debounce subsequent actions
There's no need to reset the CacheManager cache here as a process might be running using an old client. Stale data is already removed by TTL.
My URL is getting saved with a slash at the end which breaks all API requests as you get this: //api/v1
22af84a
to
bd88567
Compare
Adds support for multiple *arr servers as requested here: https://features.maintainerr.info/posts/1/multipe-arr-support. Existing settings are migrated to the new format.
Some other commits alongside this to fix a few things raised recently.
Improve Plex API failure logging
Include endpoint and api name in axios error messages
Only a few calls were logging the endpoint. The logger is also overridden so that the correct context gets logged. Resolves: https://features.maintainerr.info/posts/35/logging-more-details-when-using-debug-true
We now get this:
[DEBUG] [OverseerrApi] POST request to http://overseerr.home.arpa//api/v1/settings/jobs/availability-sync/run failed: AxiosError: Request failed with status code 404
Instead of this:
[DEBUG] [undefined] POST request failed: AxiosError: Request failed with status code 404
Improve manual collection and rule execution
The API had hung when I was testing server failure modes, there were a few places where exceptions could be thrown that wouldn't be caught which might lead to a crash:
Trim trailing slash in Overseerr URL
Not sure if this is just a Firefox thing, but my Overseerr URL gets a slash appended to the end which breaks API requests to it.