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 GCP Pub/Sub event source #43

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

Conversation

shopifyalan
Copy link
Contributor

@shopifyalan shopifyalan commented Oct 31, 2022

This PR adds support for GCP Pub/Sub as an event source and includes an example rulebook.

@shopifyalan shopifyalan marked this pull request as ready for review October 31, 2022 14:13
from typing import Any, Dict

from google.api_core import retry
from google.cloud import pubsub_v1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does pubsub_v1 support asyncio? Typically pull-and-sleep is not the best approach.

Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I see this plugin would block the python thread. It could implement futures + callbacks or, I think easier, use an asyncio library compatible

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