Skip to content

Instantly share code, notes, and snippets.

@Geremie
Last active April 3, 2022 23:57
Show Gist options
  • Save Geremie/2280ad91ee260a4af8945e3c558b48db to your computer and use it in GitHub Desktop.
Save Geremie/2280ad91ee260a4af8945e3c558b48db to your computer and use it in GitHub Desktop.
Are you using Cloud Functions for event based processing ?
def poke(self, context):
hook = GCSHook(
gcp_conn_id=self.google_cloud_conn_id,
delegate_to=self.delegate_to,
impersonation_chain=self.impersonation_chain,
)
for bucket in self.buckets:
match = [{'bucket': bucket, 'object': object}
for object in hook.list(bucket)]
self._matches.extend(match)
return bool(self._matches)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment