ManiMatter / decluttarr

Watches radarr, sonarr, lidarr, readarr and whisparr download queues and removes downloads if they become stalled or no longer needed.
GNU General Public License v3.0
100 stars 15 forks source link

Container does not restart after an error #2

Closed heisenberg2980 closed 9 months ago

heisenberg2980 commented 9 months ago

This might be considered an improvement, but this container does not restart after an error occurs.

The main issue here is that if this container starts together with radarr/sonarr/qbittorrent containers, this container fails as it tries to connect to the other containers when they are still not ready:

decluttarr  | [ERROR  ]: Error making API request to http://192.168.0.208:7878/api/v3/system/status: HTTPConnectionPool(host='192.168.0.208', port=7878): Max retries exceeded with url: /api/v3/system/status (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fedd1960460>: Failed to establish a new connection: [Errno 111] Connection refused'))

One way to solve this would be for the container to restart every time it fails, so in this case it would restart couple of times until the other containers are available.

ManiMatter commented 9 months ago

hi Heisenberg, You can restart the container automatically, if you add "restart: unless-stopped" to the docker-compose. I've added now in the docker-compose example.

Also, I added the possibility to authenticate with username&password to qbittorrent. Hope that solves the issue also for future users.

Cheers

heisenberg2980 commented 9 months ago

I can´t believe I didn´t realise the container was not restarting because I missed the restart option :grimacing:

P.S.: Thank you very much for adding the authentication to qbittorrent, you are a star!!

ManiMatter commented 9 months ago

Pleasure.

BTW, just fixed another small bug; in case you built your container just now, you might want to pull the image once more :) Sorry for that.

Hope you'll enjoy the tool, cheers