UBER-1233: Milestone related fixes (#7614)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2025-01-09 14:53:15 +07:00
committed by GitHub
parent 12e0aaa5f7
commit c9f5f4656c
15 changed files with 132 additions and 45 deletions
+7 -2
View File
@@ -27,6 +27,8 @@ interface Config {
SentryDSN: string
BrandingPath: string
WorkspaceInactivityInterval: number // Interval in days to stop workspace synchronization if not visited
}
const envMap: { [key in keyof Config]: string } = {
@@ -51,7 +53,9 @@ const envMap: { [key in keyof Config]: string } = {
CollaboratorURL: 'COLLABORATOR_URL',
SentryDSN: 'SENTRY_DSN',
BrandingPath: 'BRANDING_PATH'
BrandingPath: 'BRANDING_PATH',
WorkspaceInactivityInterval: 'WORKSPACE_INACTIVITY_INTERVAL'
}
const required: Array<keyof Config> = [
@@ -96,7 +100,8 @@ const config: Config = (() => {
CollaboratorURL: process.env[envMap.CollaboratorURL],
SentryDSN: process.env[envMap.SentryDSN],
BrandingPath: process.env[envMap.BrandingPath] ?? ''
BrandingPath: process.env[envMap.BrandingPath] ?? '',
WorkspaceInactivityInterval: parseInt(process.env[envMap.WorkspaceInactivityInterval] ?? '5') // In days
}
const missingEnv = required.filter((key) => params[key] === undefined).map((key) => envMap[key])