serJD commited on
Commit
efcf4ed
·
verified ·
1 Parent(s): b3c2436

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -57,9 +57,9 @@ def mainFunc(STREAM_ID, SOURCE_BRANCH, TARGET_BRANCH, UUID_COL, ATTR_METADATA, K
57
 
58
  # get data from notion
59
  databaseFUll_pages = fetch_all_database_pages(notion, ATTR_METADATA)
60
- time.sleep(5)
61
  kpi_database_pages = fetch_all_database_pages(notion, KPI_METADATA)
62
- time.sleep(5)
63
 
64
  # generate JSON files
65
  attributeMetaData, availableAttributes = notionTable2JSON(databaseFUll_pages, kpi_database_pages)
@@ -79,7 +79,7 @@ def mainFunc(STREAM_ID, SOURCE_BRANCH, TARGET_BRANCH, UUID_COL, ATTR_METADATA, K
79
  SOURCE_BRANCH,
80
  CLIENT,
81
  commit_id = "")
82
- time.sleep(10)
83
  # navigate to list with speckle objects of interest
84
  try:
85
  stream_data = stream["@Data"]["@{0}"]
@@ -143,7 +143,7 @@ def mainFunc(STREAM_ID, SOURCE_BRANCH, TARGET_BRANCH, UUID_COL, ATTR_METADATA, K
143
  transport = ServerTransport(client=CLIENT, stream_id=STREAM_ID)
144
  # Send the data object to the speckle stream
145
  object_id = operations.send(stream_new, [transport])
146
- time.sleep(5)
147
  # Create a new commit with the new object
148
  commit_id = CLIENT.commit.create(
149
  STREAM_ID,
 
57
 
58
  # get data from notion
59
  databaseFUll_pages = fetch_all_database_pages(notion, ATTR_METADATA)
60
+ time.sleep(1)
61
  kpi_database_pages = fetch_all_database_pages(notion, KPI_METADATA)
62
+ time.sleep(1)
63
 
64
  # generate JSON files
65
  attributeMetaData, availableAttributes = notionTable2JSON(databaseFUll_pages, kpi_database_pages)
 
79
  SOURCE_BRANCH,
80
  CLIENT,
81
  commit_id = "")
82
+ time.sleep(2)
83
  # navigate to list with speckle objects of interest
84
  try:
85
  stream_data = stream["@Data"]["@{0}"]
 
143
  transport = ServerTransport(client=CLIENT, stream_id=STREAM_ID)
144
  # Send the data object to the speckle stream
145
  object_id = operations.send(stream_new, [transport])
146
+ time.sleep(2)
147
  # Create a new commit with the new object
148
  commit_id = CLIENT.commit.create(
149
  STREAM_ID,