serJD commited on
Commit
eae1dcb
·
verified ·
1 Parent(s): aa82995

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -57,7 +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
  kpi_database_pages = fetch_all_database_pages(notion, KPI_METADATA)
 
61
 
62
  # generate JSON files
63
  attributeMetaData, availableAttributes = notionTable2JSON(databaseFUll_pages, kpi_database_pages)
@@ -77,7 +79,7 @@ def mainFunc(STREAM_ID, SOURCE_BRANCH, TARGET_BRANCH, UUID_COL, ATTR_METADATA, K
77
  SOURCE_BRANCH,
78
  CLIENT,
79
  commit_id = "")
80
-
81
  # navigate to list with speckle objects of interest
82
  try:
83
  stream_data = stream["@Data"]["@{0}"]
@@ -141,7 +143,7 @@ def mainFunc(STREAM_ID, SOURCE_BRANCH, TARGET_BRANCH, UUID_COL, ATTR_METADATA, K
141
  transport = ServerTransport(client=CLIENT, stream_id=STREAM_ID)
142
  # Send the data object to the speckle stream
143
  object_id = operations.send(stream_new, [transport])
144
-
145
  # Create a new commit with the new object
146
  commit_id = CLIENT.commit.create(
147
  STREAM_ID,
 
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
  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
  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,