
On 2/5/25 13:03, Ron / BCLUG wrote:
I've been digging into MM3 resource usage vs MM2 and have been wondering: are there any other runners that can be disabled, or invoked via cron job to run every $interval then exit again?
The task runner is a candidate. It only actually does anything at intervals defined by the run_tasks_every setting in the [mailman] section of mailman.cfg, default 1 hour https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/config/schema.c..., but it still wakes up and comes into memory every sleep_time which defaults to 1 second.
If just having the runners sleep longer works for you, you can set, e.g.
[runner.task]
sleep_time: 10m
to only wake up the task runner every 10 minutes. If you really want it gone, you could put
[runner.task]
start: no
in mailman.cfg to prevent starting it as a persistent runner, and make a python script like:
#!/opt/mailman/mm/venv/bin/python
from mailman.core import initialize
from mailman.runners.task import TaskRunner
initialize.initialize()
TaskRunner('task')._do_periodic()
and run that periodically via cron. I'm not certain, but I think task runner is the only runner for which it's that simple.
Second question, similar topic but MM2: how to disable NNTP? (if that's what this is doing):
/usr/bin/python2 /var/lib/mailman/bin/qrunner --runner=NewsRunner:0:1 -s
Put this in mm_cfg.py
del QRUNNERS[QRUNNERS.index(('NewsRunner', 1))]
or if you already have some modifications to the QRUNNERS list in mm_cfg.py, make the appropriate adjustment to remove the NewsRunner entry.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan