Message8486
One way to do this is to change the docker container to run the server using supervisor,
then add this to supervisor.conf:
[eventlistener:roundup_mail]
## poll for mail to the tracker every minute.
command=./mailgw_poller demo mailbox mbox
events=TICK_60 # poll every minute
autorestart=true # always run regardless of error status of last run.
autostart=false
then create the poller script:
#! /bin/sh
# used by eventlistener protocol transition to READY state
printf "READY\n"
# wait for event to trigger next step
read header
# import mbox on trigger
python roundup/scripts/roundup_mailgw.py "$@"
# report ok and exit to start next cycle
printf "RESULT 2\nOK"
A few caveats, this is an abuse of supervisord, but it worked.
If roundup_mailgw takes > 1 minute supervisord will queue the events for this service.
Can cause a backlog.
Need to: use roundup-mailgw in production (I was testing from a dev tree)
create a watchdog to kill roundup-mailgw if it takes > 1 minute
roundup-mailgw reports errors to stderr so it is captured by
supervisord. Exit status for roundup-mailgw is 1 in most error
cases. |
|
| Date |
User |
Action |
Args |
| 2026-08-03 04:53:47 | rouilj | set | messageid: <1785732827.77.0.159017691675.issue2551309@roundup-tracker.org> |
| 2026-08-03 04:53:47 | rouilj | set | recipients:
+ rouilj, asavchuk |
| 2026-08-03 04:53:47 | rouilj | link | issue2551309 messages |
| 2026-08-03 04:53:47 | rouilj | create | |
|