Skip to content

Commit 9fb705d

Browse files
authored
Add missed region tags (GoogleCloudPlatform#4961)
## Description Fixes #<ISSUE-NUMBER> Note: It's a good idea to open an issue first for discussion. ## Checklist - [ ] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md) - [ ] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#readme-file) - [ ] **Tests** pass: `nox -s py-3.6` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] **Lint** pass: `nox -s lint` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup)) - [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones) - [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones) - [ ] Please **merge** this PR for me once it is approved. - [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/.github/CODEOWNERS) with the codeowners for this sample
1 parent 8a8ef98 commit 9fb705d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

functions/tips/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def heavy_computation():
6363
return reduce(lambda x, t: t * x, numbers)
6464

6565

66+
# [START cloudrun_tips_global_scope]
6667
# [START run_tips_global_scope]
6768
# Global (instance-wide) scope
6869
# This computation runs at instance cold-start
@@ -84,9 +85,11 @@ def scope_demo(request):
8485
return 'Per instance: {}, per function: {}'.format(
8586
instance_var, function_var)
8687
# [END run_tips_global_scope]
88+
# [END cloudrun_tips_global_scope]
8789

8890

8991
# [START functions_tips_lazy_globals]
92+
# [START cloudrun_tips_global_lazy]
9093
# [START run_tips_global_lazy]
9194
# Always initialized (at cold-start)
9295
non_lazy_global = file_wide_computation()
@@ -114,6 +117,7 @@ def lazy_globals(request):
114117

115118
return 'Lazy: {}, non-lazy: {}.'.format(lazy_global, non_lazy_global)
116119
# [END run_tips_global_lazy]
120+
# [END cloudrun_tips_global_lazy]
117121
# [END functions_tips_lazy_globals]
118122

119123

0 commit comments

Comments
 (0)