kannibalox / pyrosimple

An overhauled fork of the pyrocore tools for rTorrent
https://kannibalox.github.io/pyrosimple/
GNU General Public License v3.0
48 stars 5 forks source link

pyrotorque bad module name #25

Closed Aqualie closed 1 year ago

Aqualie commented 1 year ago

Trying to migrate from pyrocore to pyrosimple. I've finished migrating all of the torque configuration but when I run pyrotorque --fg I simply get an error: vncviewer_2022-12-29_12-54-51

I have all the dependencies installed: vncviewer_2022-12-29_12-55-17

torque config:

## https://github.com/kannibalox/pyrosimple/blob/main/docs/pyrotorque-jobs.md
[TORQUE]
autoreload = true # false by default
[TORQUE.queue]
handler = "pyrocore.torrent.watch:QueueManager"
schedule = "second=*/15"
active = true
dry_run = false
sort_fields = "-prio, loaded, name"
downloading_min = 1
downloading_max = 9
start_at_once = 4
intermission = 0
startable = "is_ignored=0 done=0 message='' prio>0"
[TORQUE.stats]
handler = "pyrocore.torrent.jobs:EngineStats"
schedule = "minute=*"
active = true
dry_run = false
[TORQUE.watch]
handler = "pyrocore.torrent.watch:TreeWatch"
schedule = "second=*/5"
active = true
dry_run = false
load_mode = "start"
queued = true
path = "/mnt/torrent/start"
kannibalox commented 1 year ago

The handler names have been moved to be under pyrosimple.job, give the following config a try:

## https://github.com/kannibalox/pyrosimple/blob/main/docs/pyrotorque-jobs.md
[TORQUE]
autoreload = true # false by default
[TORQUE.queue]
handler = "pyrocore.job.queue:QueueManager"
schedule = "second=*/15"
active = true
dry_run = false
sort = "-prio,loaded,name"
downloading_min = 1
downloading_max = 9
start_at_once = 4
intermission = 0
startable = "is_ignored=0 done=0 message=\"\" prio>0"
[TORQUE.stats]
handler = "pyrocore.job.metrics:EngineStats"
schedule = "minute=*"
active = true
dry_run = false
[TORQUE.watch]
handler = "pyrocore.job.watch:TreeWatch"
schedule = "second=*/5"
active = true
dry_run = false
load_mode = "start"
# queued = true # No longer has any effect and doesn't change the behavior of your original config, the below command replicates the behavior if you really want it
# cmd_queue = "d.priority.set=0"
path = "/mnt/torrent/start"

Some of the changes (e.g. sort_fields = "-prio, loaded, name" to sort = "-prio,loaded,name") will be allowed in the latest code for backwards compatibility. I've also added a section to the migration docs for posterity.

Aqualie commented 1 year ago

Thank you this works perfectly now.

Aqualie commented 1 year ago

Sorry spoke too soon it's running now but if I add a new torrent to the start folder nothing is happening at all. I am seeing occasionally in the rtorrent console log: Scheduled comand failed: pyro_watchdog: Command "pyro.watchdog" does not exist" vncviewer_2022-12-29_17-58-01

kannibalox commented 1 year ago

That PytzUsageWarning is a red herring, it's not harmful at all. The Command "pyro.watchdog" does not exist is odd, that ought to have been defined by torque.rc, but it also has no effect on how pyrotorque actually runs.

Can you try using the latest version? I've added some fixes: pip install git+https://github.com/kannibalox/pyrosimple.git

If that doesn't work, try adding trace_inotify = true and running pyrotorque with --debug temporarily. It should at the very least show you the filesystem events it sees. If it doesn't see any events, you'll want to confirm that inotify works on your filesystem (some remote filesystems like NFS won't trigger inotify events on all hosts that have it mounted).

Aqualie commented 1 year ago

Thanks that did the trick it's working now.

kannibalox commented 1 year ago

Cool, I've pushed out a new release so that should be available normally. Thanks for the report.