|
25 | 25 | #####
|
26 | 26 | # Auto Permission Sync
|
27 | 27 | #####
|
| 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 |
28 | 31 | DEFAULT_PERMISSION_DOC_SYNC_FREQUENCY = int(
|
29 | 32 | os.environ.get("DEFAULT_PERMISSION_DOC_SYNC_FREQUENCY") or 5 * 60
|
30 | 33 | )
|
31 | 34 |
|
32 |
| -# In seconds, default is 5 minutes |
| 35 | + |
| 36 | +##### |
| 37 | +# Confluence |
| 38 | +##### |
| 39 | + |
| 40 | +# In seconds, default is 30 minutes |
33 | 41 | 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 |
35 | 47 | )
|
36 | 48 | # This is a boolean that determines if anonymous access is public
|
37 | 49 | # Default behavior is to not make the page public and instead add a group
|
38 | 50 | # that contains all the users that we found in Confluence
|
39 | 51 | CONFLUENCE_ANONYMOUS_ACCESS_IS_PUBLIC = (
|
40 | 52 | os.environ.get("CONFLUENCE_ANONYMOUS_ACCESS_IS_PUBLIC", "").lower() == "true"
|
41 | 53 | )
|
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 |
45 | 69 | )
|
46 | 70 |
|
47 | 71 | NUM_PERMISSION_WORKERS = int(os.environ.get("NUM_PERMISSION_WORKERS") or 2)
|
|
77 | 101 | "OAUTH_GOOGLE_DRIVE_CLIENT_SECRET", ""
|
78 | 102 | )
|
79 | 103 |
|
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 |
| - |
88 | 104 | # The posthog client does not accept empty API keys or hosts however it fails silently
|
89 | 105 | # when the capture is called. These defaults prevent Posthog issues from breaking the Onyx app
|
90 | 106 | POSTHOG_API_KEY = os.environ.get("POSTHOG_API_KEY") or "FooBar"
|
|
0 commit comments