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

docs(samples): fix create bucket for user events #173

Merged
merged 3 commits into from
Mar 3, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@
# limitations under the License.

import datetime
import os

import google.auth

from setup_cleanup import create_bucket, upload_blob

project_id = google.auth.default()[1]
timestamp_ = datetime.datetime.now().timestamp().__round__()
bucket_name = os.environ["EVENTS_BUCKET_NAME"]
bucket_name = "{}_events_{}".format(project_id, timestamp_)

create_bucket(bucket_name)
upload_blob(bucket_name, "../resources/user_events.json")
Expand Down