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

New timer manager and changed object type for input queues #16

Merged
merged 30 commits into from
Aug 16, 2024

Conversation

efunneko
Copy link
Collaborator

** NOTE - I had created a PR before that was mistakenly directed straight at SolaceLabs. This one goes to SolaceDev/main where I will assemble a few PRs before cutting a new release from SolaceLabs

This change is a fairly significant refactoring, while still being backwards compatible.

The main purpose of the refactoring was to provide a central timer service for components

It comprises:

Add a central timer manager so that components can request individual timers (and as many as they like)
Change the input queues for components to take an Event type rather than a Message type. The Event, at this moment, can be either a timeout notification or a message to be processed. The ComponentBase will handle either calling 'invoke' on a Message or 'handle_timer_event' if the Event is a timeout. Note that other event types could be added in future.
Change the aggregate component to use the central timer manager
Changed message_filter component to discard messages in the invoke handler
Cleaned up some application shutdown code to not get stuck waiting for threads
Some small test changes to adapt

efunneko and others added 29 commits August 4, 2024 12:47
…er than payload to avoid confusion with message payload
@efunneko efunneko requested a review from gregmeldrum August 15, 2024 12:32
@efunneko efunneko self-assigned this Aug 15, 2024
Copy link
Collaborator

@gregmeldrum gregmeldrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. I learned some things about python threading.


```sh
export OPENAI_API_KEY=<your OpenAI key>
export OPENAI_API_ENDPOINT=<base url of your OpenAI endpoint>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People using the openai endpoint may get confused by the endpoint and model variables in the example. Not sure if it's worthwhile to update the documentation/example, just thinking out loud.

@efunneko efunneko merged commit a9851e0 into main Aug 16, 2024
3 checks passed
@efunneko efunneko deleted the events-in-queues branch August 16, 2024 12:50
Copy link

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