wouterdebie / putioarr

put.io to sonarr/radarr proxy
MIT License
23 stars 3 forks source link

Process Hangs when any transfer is seeding #9

Open kikootwo opened 7 months ago

kikootwo commented 7 months ago

Describe the bug When there are any transfers that are status 'Finished and Seeding' no other processes will proceed. For example:

image

this transfer is done, and the one below it is waiting to import to radarr until the seeding is done (1 day for public tracker, 14 for private)

To Reproduce Steps to reproduce the behavior:

  1. Have a transfer in the 'Finished and Seeding' Status
  2. Try to complete any other processes (add transfer/download/import)
  3. observe that they seem to all be waiting for the seeding to finish

NOTE: Cancelling the seeding transfer seems to leave things in a broken state.

Logs Logs showing a few transfers starting/stopping before hanging around the seeding.

Configuration

username = "***"
password = "***"
download_directory = "/downloads"
bind_address = "0.0.0.0"
port = 9091
loglevel = "info"
uid = 1026
polling_interval = 10
skip_directories = ["sample", "extras"]
orchestration_workers = 10
download_workers = 4
[putio]
api_key =  "***"
[radarr]
url = "http://***7878"
api_key = "***"

Environment Docker container on a synology NAS

Docker Using the docker compose provided

Screenshots see above

wouterdebie commented 7 months ago

Thanks for this! Since there are a few other tickets open that have to do with state management, I'd like to fix that first, since that has a large likelihood to fix this as well. I'll keep you posted.

kikootwo commented 7 months ago

@wouterdebie Thanks for the quick reply! I'm definitely not a rust programmer, but have extensive experience with the put.io API, so if you'd like any help I'm happy to contribute.

I saw your comment in another issue about how to create states using put.io. Something I've done in my apps is use the config endpoints to store stateful values. They allow you to upload any string key and any json object to their config dictionary. So it could look somethinglike

  "config": {
    "putioarr:(FILE/TRANSFER ID)": "STATEDATA"
  }

Here's the endpoint I'm referencing: link

Maybe you've already thought of this and there's some issue, figured I'd throw it out there. If you'd like to discuss or want me to contribute on something feel free to reach out on Discord (kikootwo); Im much better at responding there.

And thanks for this project, its amazing!

wouterdebie commented 7 months ago

@kikootwo that is super helpful! I was unaware of this functionality, but that is super helpful! Thanks and I'll definitely take this into account!