Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tkarasyova committed Feb 9, 2022
1 parent 3cab5ca commit ca93750
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions samples/interactive-tutorials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ To run a code sample from the Cloud Shell, you need to be authenticated using th
export GOOGLE_APPLICATION_CREDENTIALS=~/key.json
```

### Set the GOOGLE_CLOUD_PROJECT_NUMBER and GOOGLE_CLOUD_PROJECT_ID environment variables
### Set the GOOGLE_CLOUD_PROJECT_NUMBER and GOOGLE_CLOUD_PROJECT environment variables

You will run the code samples in your own Google Cloud project. To use the **project_number** and **project_id** in every request to the Retail API, you should first specify them as environment variables.

Expand All @@ -84,7 +84,7 @@ You will run the code samples in your own Google Cloud project. To use the **pro
```
1. Set the **project_id** with the following command:
```bash
export GOOGLE_CLOUD_PROJECT_ID=<YOUR_PROJECT_ID>
export GOOGLE_CLOUD_PROJECT=<YOUR_PROJECT_ID>
```

### Install Google Cloud Retail libraries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

To successfully import the catalog data for tests, the following environment variables should be set:
- GOOGLE_CLOUD_PROJECT_NUMBER
- GOOGLE_CLOUD_PROJECT_ID
- GOOGLE_CLOUD_PROJECT
- BUCKET_NAME
- EVENTS_BUCKET_NAME
These values are stored in the Secret Manager and will be submitted as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def import_products_from_big_query():

while not big_query_operation.done():
print("---please wait till operation is done---")
time.sleep(5)
time.sleep(30)
print("---import products operation is done---")

if big_query_operation.metadata is not None:
Expand Down
4 changes: 2 additions & 2 deletions samples/interactive-tutorials/product/import_products_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def import_products_from_gcs():

while not gcs_operation.done():
print("---please wait till operation is done---")
time.sleep(5)
time.sleep(30)
print("---import products operation is done---")

if gcs_operation.metadata is not None:
Expand All @@ -104,7 +104,7 @@ def import_products_from_gcs():

# The imported products needs to be indexed in the catalog before they become available for search.
print(
"Wait 2 -5 minutes till products become indexed in the catalog, after that they will be available for search"
"Wait 2-5 minutes till products become indexed in the catalog, after that they will be available for search"
)


Expand Down
4 changes: 1 addition & 3 deletions samples/interactive-tutorials/product/noxfile_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
# A dictionary you want to inject into your test. Don't put any
# secrets here. These values will override predefined values.
"envs": {
"BUCKET_NAME": "retail-interactive-tutorials"
},
"envs": {"BUCKET_NAME": "retail-interactive-tutorials"}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
project_number = os.environ["GOOGLE_CLOUD_PROJECT_NUMBER"]
products_bucket_name = os.environ['BUCKET_NAME']
events_bucket_name = os.environ['EVENTS_BUCKET_NAME']
project_id = os.environ["GOOGLE_CLOUD_PROJECT_ID"]
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]

product_resource_file = "../resources/products.json"
events_source_file = "../resources/user_events.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
project_number = os.environ["GOOGLE_CLOUD_PROJECT_NUMBER"]
product_bucket_name = os.environ['BUCKET_NAME']
events_bucket_name = os.environ['EVENTS_BUCKET_NAME']
project_id = os.environ["GOOGLE_CLOUD_PROJECT_ID"]
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]

product_dataset = "products"
events_dataset = "user_events"
Expand Down

0 comments on commit ca93750

Please sign in to comment.