Skip to content

Commit cab1d10

Browse files
authored
Merge pull request #1082 from sphinx-contrib/internal-delay-all-cloud-prop-events
internal delay all cloud property update events
2 parents 78a2603 + d29b0ca commit cab1d10

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

sphinxcontrib/confluencebuilder/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ def setup(app):
258258
cm.add_conf_bool('confluence_adv_bulk_archiving')
259259
# Force override for detected Cloud state.
260260
cm.add_conf_bool('confluence_adv_cloud')
261+
# Disable any delays when publishing property updates on Cloud
262+
cm.add_conf_bool('confluence_adv_disable_cloud_prop_delay')
261263
# Disable workaround for: https://jira.atlassian.com/browse/CONFCLOUD-74698
262264
cm.add_conf_bool('confluence_adv_disable_confcloud_74698')
263265
# Disable workaround for inline-extension anchor injection

sphinxcontrib/confluencebuilder/publisher.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,13 +1112,6 @@ def store_page(self, page_name, data, parent_id=None):
11121112

11131113
uploaded_page_id = rsp['id']
11141114

1115-
# always wait a little moment before updating properies on
1116-
# cloud -- it seems to take a moment to complete creating
1117-
# initial properties after we build a new page, and we want
1118-
# to avoid a conflict (409) if possible
1119-
if self.cloud:
1120-
time.sleep(0.5)
1121-
11221115
# we have properties we would like to apply, but we cannot
11231116
# just create new ones if Confluence already created ones
11241117
# implicitly in the new page update -- we will need to
@@ -1243,6 +1236,14 @@ def _update_page_properties(self, page_id, properties):
12431236
properties: the properties to update
12441237
"""
12451238

1239+
# always wait a little moment before updating properties on
1240+
# cloud -- it seems to take a moment to complete creating or
1241+
# updating properties after we build process a page, and we want
1242+
# to avoid a conflict (409) if possible
1243+
if self.cloud:
1244+
if not self.config.confluence_adv_disable_cloud_prop_delay:
1245+
time.sleep(0.5)
1246+
12461247
# we have properties we would like to apply, but we cannot
12471248
# just create new ones if Confluence already created ones
12481249
# implicitly in the new page update -- we will need to

0 commit comments

Comments
 (0)