HaveAGitGat / Tdarr_Plugins

Tdarr Plugins
GNU General Public License v3.0
137 stars 156 forks source link

New Flow Plugin - Pause Node and Requeue #658

Open davidry opened 3 months ago

davidry commented 3 months ago

Feature Request

Occasionally, one of my nodes looses the ability to perform Hardware transcoding, I currently use CheckNodeHardwareEncoder Currently, I send the file to "Require Review", however this will fill-up my staging queue preventing the others from running

Ideally, Having a plugin that allows us to Pause a specific Node, and send the task to another worker would allow the service to continue working.

Bonus points:

Note: I'm using Docker Swarm with a secondary stack to version: '3.8' services: DeviceMappingMgr: image: alpinelinux/docker-cli deploy: mode: global entrypoint: docker command: | run --rm -i --name device-manager --privileged --cgroupns=host --pid=host --userns=host -v /sys:/host/sys -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/allfro/allfro/device-mapping-manager:nightly volumes:

HaveAGitGat commented 3 months ago

Maybe this well help, you can try the requeue system here:

https://github.com/HaveAGitGat/Tdarr/issues/748#issuecomment-2146710875

HaveAGitGat commented 3 months ago

2.20.01 released which can use Requeue and Worker Type flow plugins.

davidry commented 3 months ago

Thanks for that!

@HaveAGitGat - any chance we can have a plugin to pause the current node (Instead of Pause All Nodes), or Remove a worker-type tag? an alternate would be to send a shutdown worker request, forcing docker to re-start the worker

All my Docker instances start as VAAPI accelerated, however after some host-side process causes High CPU usage, the device claims to not be Hardware accelerated when running "check node hardware encoder" until I restart the container

HaveAGitGat commented 3 months ago

Removing the tag would be the same as setting it to CPUorGPU which allows any worker type to do it:

image

Or do you mean something different?

And sure will try to add a pause node plugin soon.

davidry commented 3 months ago

for some reason, a VAAPI compatible device will stop being able to utilize hardware encoding until the docker instance is rebooted:

this worker has been running for a few days, and has recently gotten stuck

image image

having the ability to disable or un-mark the node's hardware type would prevent this loop Better yet, being able to shutdown the node would allow docker to re-create the worker and continue.

I'm not sure what happens to cause this, these services could run for days without issues, or run into this within the first few hours this has happened to multiple nodes.