Closed sakhawy closed 6 months ago
Sorry Moe I just merged a dependabot so this needs a rebase/conflict resolution ❤️
This looks good, we either need celery or something similar set up (https://github.com/djangonaut-space/wagtail-indymeet/issues/270) or a cron job (https://github.com/ui/django-post_office?tab=readme-ov-file#quickstart) in order to send these emails. I think we haven't quite figured out how to do this yet 🤔 (cc: @dawnwages @tim-schilling)
I tried to hack my way through with supervisord
:smile:
[program:post_office_send_queued_mail]
command=bash -c 'python /app/manage.py send_queued_mail && sleep 30'
autorestart=true
[program:post_office_cleanup_mail]
command=bash -c 'python /app/manage.py python manage.py cleanup_mail --days=30 --delete-attachments && sleep 86400'
autorestart=true
@sakhawy how much testing of that hack did you do? Is it something we can merge and go, or do I need to do some verification when it gets pushed to staging?
Here's how I tested it:
docker compose up
docker exec -it <wagtail-indymeet-web-container-id> bash
supervisord -c supervisord.conf
I'd say some verification is needed just to make sure.
I changed it to default the production setting in base.py and override in dev rather than production.
Thanks @sakhawy!
We're no longer sending emails on staging
@sakhawy if it helps, the docker configuration is just to aid local setup. We're not deploying this image
Thanks @sarahboyce! Yeah, I was just trying to emulate supervisord running management commands periodically on startup.
312