File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
iot/api-client/gcs_file_to_device Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1515import os
1616import sys
1717import tempfile
18- import time
18+ import uuid
1919
2020from google .cloud import pubsub
2121from google .cloud import storage
3434project_id = os .environ ['GCLOUD_PROJECT' ]
3535service_account_json = os .environ ['GOOGLE_APPLICATION_CREDENTIALS' ]
3636
37- topic_id = 'test-device-events-{}' .format (int ( time . time ()))
38- device_id = 'test-device-{}' .format (int ( time . time ()))
39- registry_id = 'test-registry-{}' .format (int ( time . time ()))
37+ topic_id = 'test-device-events-{}' .format (str ( uuid . uuid4 ()))
38+ device_id = 'test-device-{}' .format (str ( uuid . uuid4 ()))
39+ registry_id = 'test-registry-{}' .format (str ( uuid . uuid4 ()))
4040pubsub_topic = 'projects/{}/topics/{}' .format (project_id , topic_id )
4141
4242cloud_region = 'us-central1'
You can’t perform that action at this time.
0 commit comments