Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 824 Bytes

06-scheduler-pub-sub.md

File metadata and controls

41 lines (30 loc) · 824 Bytes

Pub/Sub Bridge

NOTE: pub-sub-bridge is not in use anymore. cloud scheduler can now natively run HTTP requests

CF to route calls to API.

gcloud pubsub topics create \
  ch-openbroadcast-bridge-topic

gcloud pubsub subscriptions create \
  ch-openbroadcast-bridge-sub \
  --topic ch-openbroadcast-bridge-topic

Create schedule:

https://console.cloud.google.com/cloudscheduler/jobs/new?project=open-broadcast

# test
gcloud pubsub subscriptions pull \
  ch-openbroadcast-bridge-sub \
  --limit 5

Deploy CF

gcloud functions deploy \
    ch-openbroadcast-bridge \
    --entry-point bridge \
    --project open-broadcast \
    --runtime python38 \
    --region europe-west6 \
    --source ./functions/pub-sub-bridge/ \
    --trigger-topic ch-openbroadcast-bridge-topic