Skip to content

Feat observer esque alerts#44

Open
Poofjunior wants to merge 2 commits into
mainfrom
feat-observer-esque-alerts
Open

Feat observer esque alerts#44
Poofjunior wants to merge 2 commits into
mainfrom
feat-observer-esque-alerts

Conversation

@Poofjunior

@Poofjunior Poofjunior commented Feb 12, 2026

Copy link
Copy Markdown
Collaborator

Here's an alternate proposal for sending alerts.

Currently, we're appending Brainslosher functionality inside a one-liner stream callback. Specifically, in brainslosher_main.py, we call

self.add_stream("check_job_status", 1, self.check_job_status)

But self.check_job_status also sends emails in addition to sending the job status to the subscriber. (Streams should just be calling "getter" functions.)

This change makes it so we can add an arbitrary function that gets called any time self.job_status changes.

The results:

  • we no longer add functionality in a zmq stream.
  • we can remove the Lock around changing self.job_status

There's still a bit of a question from my end as to where we should be storing the email if this alert functionality is truly standalone, but this works for now.

Heads-up: we should test this on real hardware before merging.

@Poofjunior Poofjunior requested review from a team and micahwoodard February 12, 2026 23:13
@patricklatimer

Copy link
Copy Markdown

So I've been experimenting (literally just today) with this very cool library/tool called apprise that really seems to be the ideal notification tool. You can use it as a python library, CLI, or even set up a docker with a REST API to receive notification content and distribute it. It's super configurable and comes with integrations for all sorts of notification platforms.
https://github.com/AllenNeuralDynamics/SIPE-Admin/issues/159

Anyway, brainslosher should use this, then we can just configure the notification destinations from a yaml file (and actually apprise supports loading config from http so we can easily use Jessy's ficus config api)

@Poofjunior

Copy link
Copy Markdown
Collaborator Author

Anyway, brainslosher should use this, then we can just configure the notification destinations from a yaml file (and actually apprise supports loading config from http so we can easily use Jessy's ficus config api)

Ok sounds good! It should only be a matter of changing the implementation of the current function that sends emails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants