[Deluge] #3645: Feature Request: toggle all torrents via API

3 views
Skip to first unread message

Deluge

unread,
Sep 13, 2024, 10:44:09 AM9/13/24
to delug...@googlegroups.com
#3645: Feature Request: toggle all torrents via API
----------------------------+------------------------------
Reporter: iconoclasthero | Type: feature-request
Status: new | Priority: minor
Milestone: 2.x | Component: Core
Version: 2.0.5 | Keywords: pause api toggle
----------------------------+------------------------------
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
johnnyb...@gmail.com's code to be updated/forked.
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/3645>
Deluge <https://deluge-torrent.org/>
Deluge Project

Deluge

unread,
Sep 13, 2024, 11:05:54 AM9/13/24
to delug...@googlegroups.com
#3645: Feature Request: toggle all torrents via API
------------------------------+------------------------------
Reporter: iconoclasthero | Owner: (none)

Type: feature-request | Status: new
Priority: minor | Milestone: 2.x
Component: Core | Version: 2.0.5
Resolution: | Keywords: pause api toggle
------------------------------+------------------------------
Comment (by iconoclasthero):

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:

{{{

$ mpd --help
Usage:
mpd [OPTION...] [path/to/mpd.conf]

Music Player Daemon - a daemon for playing music.

Options:
--kill kill the currently running mpd session
}}}
--
Ticket URL: <http://dev.deluge-torrent.org/ticket/3645#comment:1>

Reply all
Reply to author
Forward
0 new messages