Skip to content

Commit

Permalink
docs(samples): fix create bucket for user events (#173)
Browse files Browse the repository at this point in the history
* feat: fix create bucket for user events

* lint fix

Co-authored-by: Karl Weinmeister <11586922+kweinmeister@users.noreply.github.com>
  • Loading branch information
tetiana-karasova and kweinmeister authored Mar 3, 2022
1 parent f12c3c3 commit bd48246
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit bd48246

Please sign in to comment.