You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: allow repo sync interval settings to be configured via env vars
Add environment variable support for repo sync interval settings:
- REINDEX_INTERVAL_MS
- RESYNC_CONNECTION_INTERVAL_MS
- REINDEX_REPO_POLLING_INTERVAL_MS
- RESYNC_CONNECTION_POLLING_INTERVAL_MS
Priority order: env var > config file settings > hardcoded default.
Invalid values (non-numeric or <= 0) will produce a clear error at
startup via Zod validation.
Fixes SOU-818
Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
|`maxFileSize`| number | 2 MB | 1 | Maximum size (bytes) of a file to index. Files exceeding this are skipped. |
42
42
|`maxTrigramCount`| number | 20 000 | 1 | Maximum trigrams per document. Larger files are skipped. |
43
-
|`reindexIntervalMs`| number | 1 hour | 1 | Interval at which all repositories are re‑indexed. |
44
-
|`resyncConnectionIntervalMs`| number | 24 hours | 1 | Interval for checking connections that need re‑syncing. |
45
-
|`resyncConnectionPollingIntervalMs`| number | 1 second | 1 | DB polling rate for connections that need re‑syncing. |
46
-
|`reindexRepoPollingIntervalMs`| number | 1 second | 1 | DB polling rate for repos that should be re‑indexed. |
43
+
|`reindexIntervalMs`| number | 1 hour | 1 | Interval at which all repositories are re‑indexed. Can be overridden with `REINDEX_INTERVAL_MS` env var.|
44
+
|`resyncConnectionIntervalMs`| number | 24 hours | 1 | Interval for checking connections that need re‑syncing. Can be overridden with `RESYNC_CONNECTION_INTERVAL_MS` env var.|
45
+
|`resyncConnectionPollingIntervalMs`| number | 1 second | 1 | DB polling rate for connections that need re‑syncing. Can be overridden with `RESYNC_CONNECTION_POLLING_INTERVAL_MS` env var.|
46
+
|`reindexRepoPollingIntervalMs`| number | 1 second | 1 | DB polling rate for repos that should be re‑indexed. Can be overridden with `REINDEX_REPO_POLLING_INTERVAL_MS` env var.|
Copy file name to clipboardExpand all lines: docs/docs/configuration/environment-variables.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,10 @@ The following environment variables allow you to configure your Sourcebot deploy
28
28
|`REDIS_REMOVE_ON_FAIL`|`100`| <p>Controls how many failed jobs are allowed to remain in Redis queues</p> |
29
29
|`REPO_SYNC_RETRY_BASE_SLEEP_SECONDS`|`60`| <p>The base sleep duration (in seconds) for exponential backoff when retrying repository sync operations that fail</p> |
30
30
|`GITLAB_CLIENT_QUERY_TIMEOUT_SECONDS`|`600`| <p>The timeout duration (in seconds) for GitLab client queries</p> |
31
+
|`REINDEX_INTERVAL_MS`|`3600000` (1 hour) | <p>The interval (in milliseconds) at which all repositories are re-indexed. Overrides `settings.reindexIntervalMs` from the config file.</p> |
32
+
|`RESYNC_CONNECTION_INTERVAL_MS`|`86400000` (24 hours) | <p>The interval (in milliseconds) for checking connections that need re-syncing. Overrides `settings.resyncConnectionIntervalMs` from the config file.</p> |
33
+
|`REINDEX_REPO_POLLING_INTERVAL_MS`|`1000` (1 second) | <p>The polling rate (in milliseconds) at which the database should be checked for repos that need re-indexing. Overrides `settings.reindexRepoPollingIntervalMs` from the config file.</p> |
34
+
|`RESYNC_CONNECTION_POLLING_INTERVAL_MS`|`1000` (1 second) | <p>The polling rate (in milliseconds) at which the database should be checked for connections that need re-syncing. Overrides `settings.resyncConnectionPollingIntervalMs` from the config file.</p> |
31
35
|`SMTP_CONNECTION_URL`|`-`| <p>The url to the SMTP service used for sending transactional emails. See [this doc](/docs/configuration/transactional-emails) for more info.</p><p>You can also use `SMTP_HOST`, `SMTP_PORT`, `SMTP_USERNAME`, and `SMTP_PASSWORD` to construct the SMTP connection url.</p> |
32
36
|`SMTP_HOST`|`-`| <p>The hostname of the SMTP server. Used to construct `SMTP_CONNECTION_URL` when individual SMTP variables are provided.</p> |
33
37
|`SMTP_PORT`|`-`| <p>The port of the SMTP server.</p> |
0 commit comments