Hi all,
I know this is old, but this seems to be an open topic. I did a bit of digging and found that in ./config/supervisor.conf there is a definition of the workers, containing
[program:frappe-bench-frappe-short-worker]
command=/usr/local/bin/bench worker --queue short
priority=4
autostart=true
autorestart=true
stdout_logfile=/home/frappe/frappe-bench/logs/worker.log
stderr_logfile=/home/frappe/frappe-bench/logs/worker.error.log
user=frappe
stopwaitsecs=360
directory=/home/frappe/frappe-bench
killasgroup=true
numprocs=1
process_name=%(program_name)s-%(process_num)d
As far as I understand, the short worker is used to send mails. stopwaitsecs is the duration, how long this will be kept alive, so unfortunately, this does not impact the send intervalā¦
Then, I found that in hooks.py, the email queue is flushed with the all trigger (~every 4 minutes according to https://frappe.io/docs/user/en/tutorial/task-runner). So, I have added to my custom app in the hooks.py the following block:
scheduler_events = {
"cron": {
"* * * * *": [
"frappe.email.queue.flush"
]
}
}
This seems to run the queue every minuteā¦