Opened 5 weeks ago
Last modified 5 weeks ago
#3645 new feature-request
Feature Request: toggle all torrents via API
Reported by: | iconoclasthero | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.x |
Component: | Core | Version: | 2.0.5 |
Keywords: | pause api toggle | Cc: | iconoclasthero |
Description
The time it takes for systemd to shutdown deluged by default is unacceptable to me. I've cut that down via, however it isn't like deluged is shutting down in 20s after SIGTERM is received, it's killed 20s later after systemd gets tired of waiting (because I am) it sends SIGKILL...
`
ExecStop=/usr/bin/pkill deluged
TimeoutStopSec=20s
`
So the first obvious question is 20s enough for deluged to do whatever wrap up to write to it's state file and any actively downloading torrents, etc., ON MY SYSTEM?
I don't know how to answer that. What makes sense to me is this:
if I had script control over the deluged toggle
plugin via the cli or the api, I could pause all active torrents and let deluged write out open downloads. Shutting the daemon down in < 20s with no active torrents should be sufficient from there.
tl;dr FEATURE REQUEST: Incorporate the toggle plugin into deluge-gtk (as I feel this should be a feature of the program itself). Make it accessible from the CLI (preferred) or API.
Obviously, if this is not possible access to the plugin function from a script would satisfice here but would presumably require johnnybg+deluge@gmail.com's code to be updated/forked.
Well, it appears that python3/deluged does not respond to SIGTERM on my machine so it's probably even more important to at least shut down the open downloads before ultimately sending SIGKILL after the timeout period (i.e., 20s as described in OP).
To add onto this FR: Add a
--kill|-k
option to deluged, e.g,. mpd's: