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

Add wait and wake to blocking topic #379

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Add wait and wake to blocking topic #379

merged 1 commit into from
Nov 29, 2023

Conversation

slaroche
Copy link
Contributor

No description provided.

@slaroche
Copy link
Contributor Author

@isra17 up for review

@slaroche
Copy link
Contributor Author

Should we do the same wait when the topic failed?

    def run(self):
           try:
               ...
            except Exception:
                self.logger.exception("Topic failed")
                await asyncio.sleep(self.sleep_time.total_seconds()) # -> await self.wait()
                continue

@isra17
Copy link
Member

isra17 commented Nov 29, 2023

Should we do the same wait when the topic failed?

    def run(self):
           try:
               ...
            except Exception:
                self.logger.exception("Topic failed")
                await asyncio.sleep(self.sleep_time.total_seconds()) # -> await self.wait()
                continue

I think it's fine for now. The proper thing to do would be proper backoff retries.

@isra17 isra17 merged commit 402b2e7 into main Nov 29, 2023
3 checks passed
@isra17 isra17 deleted the sam/blocking-topic-wait branch November 29, 2023 20:31
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