Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API - executors now publish events #154

Merged
merged 1 commit into from
Nov 9, 2024
Merged

API - executors now publish events #154

merged 1 commit into from
Nov 9, 2024

Conversation

robacarp
Copy link
Collaborator

@robacarp robacarp commented Nov 8, 2024

This allows a simple real time approach to monitoring a mosquito cluster:

ic(1.13.1):pry> c = Mosquito::Api.event_receiver
 => #<Channel(Mosquito::Backend::BroadcastMessage):0x146c30c80>
ic(1.13.1):pry> c.receive
 => Mosquito::Backend::BroadcastMessage(@channel="mosquito:executor:4385634608", @message="{\"event\":\"job-started\",\"job_run\":\"1731083800881:387\",\"from_queue\":\"demo_queue\"}")

In this example, after executing c.receive, I ran make demo in another terminal tab. There's still some reasonable work to be done to queue up messages when the receiver isn't yet listening, but that'll wait until I have a real use case in my hands.

@robacarp robacarp merged commit 0a78450 into master Nov 9, 2024
3 checks passed
@robacarp robacarp deleted the adds_mosquito_api branch November 9, 2024 04:31
@robacarp robacarp added this to the API milestone Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant