Problem we want to solve
A script takes some hours to complete. It runs in background. The script caretaker wants to be notified when the script is done.
Plan
Provide a notification utility accessible in CLI, so it's as easy as:
python3 broadwayvenues && notifyme "Broadway venues successfully processed."
Then, the utility send a payload to the notification center:
{ source: "harmonia@ysul.nasqueron.org", message: "Broadway venues successfully processed." }
The notification center then could:
- send a notification to a different queue on the broker than for public notifications, so it can be processed by another application
- send a mail (but notifyme could directly do echo '' | mail -t "Broadway venues successfully processed." user@domail.tld)
Command example
./your-awesome-command --service GitHub --project Nasqueron --group Operations --type commit --text "dereckson committed ..." --link https://...
More information
From who?
- service: "GitHub",
- ℹ️ The notification's source service (e.g. GitHub, Phabricator, Jenkins)
For whom?
- project: "Nasqueron",
- ℹ️ The notification's target project (e.g. Wikimedia, Nasqueron, Wolfplex)
- group: "Operations",
- ℹ️ The notification's target group (e.g. Tasacora, Operations)
WHAT? (optional)
- type: "commit",
- ℹ️ The notification's type (e.g. "commits", "task")
- text: "dereckson committed Revoke unused SSH keys for dereckson",
- 🚨 Default value: "" (empty string)
- ℹ️ The notification's text
- link: "https://github.com/nasqueron/operations/commit/95b800c2a259be0c4727c004f8ad918e8062b93b",
- 🚨 Default value: "" (empty string)
- ℹ️ The notification's URL, to be used as the main link for widgets / @var string