Skip to content

alert on subscription failure, and shutdown returns an empty list #5

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

danfischetti
Copy link

No description provided.

@@ -261,14 +271,24 @@ def pull_messages(
)

for subscription_path in self._subscription_paths:
# need a separate scheduler per subscription since the queue is tied to subscription path
Copy link
Contributor

Choose a reason for hiding this comment

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

comment is still valid i think

self.shutdown_event = shutdown_event

def shutdown(self, await_msg_callbacks=False) -> List: # type: ignore
self.shutdown_event.set()
Copy link
Author

Choose a reason for hiding this comment

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

Not sure if setting this shutdown event in the Scheduler is necessary. I think the important bit was to return the empty list instead of None.

self.shutdown_event = shutdown_event

def shutdown(self, await_msg_callbacks=False) -> List: # type: ignore
self.shutdown_event.set()
Copy link
Contributor

Choose a reason for hiding this comment

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

hm not sure how I feel about this - the event is technically just an input to this class and owned by the caller. I'd rather we raise an exception here and let caller deal with that instead of this - thoughts?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, I dont think we need this shutdown event here

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