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 15
15
import os
16
16
import sys
17
17
import tempfile
18
- import time
18
+ import uuid
19
19
20
20
from google .cloud import pubsub
21
21
from google .cloud import storage
34
34
project_id = os .environ ['GCLOUD_PROJECT' ]
35
35
service_account_json = os .environ ['GOOGLE_APPLICATION_CREDENTIALS' ]
36
36
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 ()))
40
40
pubsub_topic = 'projects/{}/topics/{}' .format (project_id , topic_id )
41
41
42
42
cloud_region = 'us-central1'
You can’t perform that action at this time.
0 commit comments