ETOOBUSY 🚀 minimal blogging for the impatient
Minion is a handy module.
In a project that I’m on at the moment I’m managing some front-end stuff that is functional to produce emails with PDF attachments to send to specific recipients, possibly with scheduling.
In this, having a backend that takes care to do the heavy lifting while the frontend is busy with the user is very handy. And Minion makes this possible in a very unobstrusive way.
So, in my setup I’m doing this:
- save an “order” to send an email at a certain (future) time from the frontend, saving it inside the database;
- place a task
enqueue_emailsregularly in Minion, to get all emails that can be sent because they passed their
- in this job, create a task for each email to be sent, again in Minion.
It comes with a handy plugin that adds a
/minion endpoint in a
Mojolicious application, allowing to see how is the queue going.
Interesting, although the fan in my PC started pretty soon because the
page asks for continuos updates (makes sense but still…).
Another advantage is that it can be supported both by a Postgresql and a SQLite database, which is very handy.