Skip to content

Commit 1a681d8

Browse files
authored
fix: fixes run events gcs sample region tags (#4107)
Signed-off-by: Grant Timmerman <timmerman+devrel@google.com>
1 parent 946bfee commit 1a681d8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

run/events-gcs/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START run_events_pubsub_dockerfile]
15+
# [START run_events_gcs_dockerfile]
1616

1717
# Use the official Python image.
1818
# https://hub.docker.com/_/python
@@ -38,4 +38,4 @@ COPY . ./
3838
# For environments with multiple CPU cores, increase the number of workers
3939
# to be equal to the cores available.
4040
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app
41-
# [END run_events_pubsub_dockerfile]
41+
# [END run_events_gcs_dockerfile]

run/events-gcs/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# [START run_events_pubsub_server_setup]
14+
# [START run_events_gcs_server_setup]
1515
import os
1616

1717
from flask import Flask, request
@@ -20,10 +20,10 @@
2020
required_fields = ['Ce-Id', 'Ce-Source', 'Ce-Type', 'Ce-Specversion']
2121

2222
app = Flask(__name__)
23-
# [END run_events_pubsub_server_setup]
23+
# [END run_events_gcs_server_setup]
2424

2525

26-
# [START run_events_pubsub_handler]
26+
# [START run_events_gcs_handler]
2727
@app.route('/', methods=['POST'])
2828
def index():
2929
for field in required_fields:
@@ -40,10 +40,10 @@ def index():
4040
ce_subject = request.headers.get('Ce-Subject')
4141
print(f'GCS CloudEvent type: {ce_subject}')
4242
return (f'GCS CloudEvent type: {ce_subject}', 200)
43-
# [END run_events_pubsub_handler]
43+
# [END run_events_gcs_handler]
4444

4545

46-
# [START run_events_pubsub_server]
46+
# [START run_events_gcs_server]
4747
if __name__ == "__main__":
4848
app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
49-
# [END run_events_pubsub_server]
49+
# [END run_events_gcs_server]

0 commit comments

Comments
 (0)