Skip to content

Commit 6b38700

Browse files
Wevesaronszanto
authored andcommitted
Adjust confluence perm sync frequency (onyx-dot-app#4613)
* Adjust confluence perm sync frequency * Fiux comment
1 parent b3f324a commit 6b38700

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

backend/ee/onyx/configs/app_configs.py

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,47 @@
2525
#####
2626
# Auto Permission Sync
2727
#####
28+
# should generally only be used for sources that support polling of permissions
29+
# e.g. can pull in only permission changes rather than having to go through all
30+
# documents every time
2831
DEFAULT_PERMISSION_DOC_SYNC_FREQUENCY = int(
2932
os.environ.get("DEFAULT_PERMISSION_DOC_SYNC_FREQUENCY") or 5 * 60
3033
)
3134

32-
# In seconds, default is 5 minutes
35+
36+
#####
37+
# Confluence
38+
#####
39+
40+
# In seconds, default is 30 minutes
3341
CONFLUENCE_PERMISSION_GROUP_SYNC_FREQUENCY = int(
34-
os.environ.get("CONFLUENCE_PERMISSION_GROUP_SYNC_FREQUENCY") or 5 * 60
42+
os.environ.get("CONFLUENCE_PERMISSION_GROUP_SYNC_FREQUENCY") or 30 * 60
43+
)
44+
# In seconds, default is 30 minutes
45+
CONFLUENCE_PERMISSION_DOC_SYNC_FREQUENCY = int(
46+
os.environ.get("CONFLUENCE_PERMISSION_DOC_SYNC_FREQUENCY") or 30 * 60
3547
)
3648
# This is a boolean that determines if anonymous access is public
3749
# Default behavior is to not make the page public and instead add a group
3850
# that contains all the users that we found in Confluence
3951
CONFLUENCE_ANONYMOUS_ACCESS_IS_PUBLIC = (
4052
os.environ.get("CONFLUENCE_ANONYMOUS_ACCESS_IS_PUBLIC", "").lower() == "true"
4153
)
42-
# In seconds, default is 5 minutes
43-
CONFLUENCE_PERMISSION_DOC_SYNC_FREQUENCY = int(
44-
os.environ.get("CONFLUENCE_PERMISSION_DOC_SYNC_FREQUENCY") or 5 * 60
54+
55+
56+
#####
57+
# Google Drive
58+
#####
59+
GOOGLE_DRIVE_PERMISSION_GROUP_SYNC_FREQUENCY = int(
60+
os.environ.get("GOOGLE_DRIVE_PERMISSION_GROUP_SYNC_FREQUENCY") or 5 * 60
61+
)
62+
63+
64+
#####
65+
# Slack
66+
#####
67+
SLACK_PERMISSION_DOC_SYNC_FREQUENCY = int(
68+
os.environ.get("SLACK_PERMISSION_DOC_SYNC_FREQUENCY") or 5 * 60
4569
)
4670

4771
NUM_PERMISSION_WORKERS = int(os.environ.get("NUM_PERMISSION_WORKERS") or 2)
@@ -77,14 +101,6 @@
77101
"OAUTH_GOOGLE_DRIVE_CLIENT_SECRET", ""
78102
)
79103

80-
GOOGLE_DRIVE_PERMISSION_GROUP_SYNC_FREQUENCY = int(
81-
os.environ.get("GOOGLE_DRIVE_PERMISSION_GROUP_SYNC_FREQUENCY") or 5 * 60
82-
)
83-
84-
SLACK_PERMISSION_DOC_SYNC_FREQUENCY = int(
85-
os.environ.get("SLACK_PERMISSION_DOC_SYNC_FREQUENCY") or 5 * 60
86-
)
87-
88104
# The posthog client does not accept empty API keys or hosts however it fails silently
89105
# when the capture is called. These defaults prevent Posthog issues from breaking the Onyx app
90106
POSTHOG_API_KEY = os.environ.get("POSTHOG_API_KEY") or "FooBar"

0 commit comments

Comments
 (0)