Dynamic multi-stage notifiers #52
Labels
area: notifiers
level: advanced
priority: low
type: enhancement
Changes or improvements to existing features
Milestone
Currently, our notifiers only do a single thing - they notify when a job is done, and they do this at the end of the job.
For some notifiers, this is fine. For example, if we add an Email notifier, it makes sense to just send a single mail at the end of the job. However, for notifiers like Discord, we can do better than this. We can have the notifier dynamically update its progress as it progresses!
How would this look?
When blackbox starts up, the notifier sends its first message. It lists all the databases and all the storage methods, but shows all as pending, using 🟠 as the emoji.
Next, some of these will start, and the emoji changes to ♻️ (for collecting backup). When the backup has been collected and it starts uploading, it changes to ⬆️. Finally, it changes to ✅ when the process is complete. If it fails at any point, it changes to ⛔.
Yeah but, how do we do this?
I'm going to leave that up to you, but the basic idea will be something like this:
cli.py
, they should probably be passed into the database and storage handler objects, and then called from inside the relevant methods.I'm intentionally leaving the implementation details a bit vague, because it'll probably be easier if you have a bit of leeway on how to implement, and because it's an interesting challenge. Do chat with me on the lemonsaurus Discord if you'd like to discuss ideas for implementation, though.
The text was updated successfully, but these errors were encountered: