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

pulsar integration #20

Merged
merged 5 commits into from
Sep 24, 2024
Merged

pulsar integration #20

merged 5 commits into from
Sep 24, 2024

Conversation

daveads
Copy link

@daveads daveads commented Sep 19, 2024

Pulsar integration Feature #583

permitio/opal#583

@daveads
Copy link
Author

daveads commented Sep 19, 2024

review.mp4

broadcaster/_backends/pulsar.py Outdated Show resolved Hide resolved

async def next_published(self) -> Event:
while True:
msg = await self._run_in_executor(self._consumer.receive)

Choose a reason for hiding this comment

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

Better wrap everything inside this while in a try except all, so that an exception will not crash the consumer.

broadcaster/_backends/pulsar.py Show resolved Hide resolved
broadcaster/_backends/pulsar.py Outdated Show resolved Hide resolved
@daveads
Copy link
Author

daveads commented Sep 22, 2024

@danyi1212 ...

@daveads
Copy link
Author

daveads commented Sep 23, 2024

@danyi1212 waiting for workflow approval

@daveads
Copy link
Author

daveads commented Sep 24, 2024

@danyi1212 Found out [asyncio.to](http://asyncio.to/)_thread() isn't available for python 3.8 along
with some other errors... am currently fixing them.

just updating you on my progress.

@daveads
Copy link
Author

daveads commented Sep 24, 2024

@danyi1212

  • Used anyio.to_thread.run_sync() which works across various Python versions, including 3.8
  • Setup workflow for pulsar test on github action...

Everything works fine currently on a test branch...

https://github.com/daveads/broadcaster/actions/runs/11015265520

@danyi1212 danyi1212 merged commit 17d5f9d into permitio:master Sep 24, 2024
6 checks passed
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.

3 participants