2025-10-31 20:08:51 +00:00
|
|
|
import { CodeHostType } from "@sourcebot/db";
|
2025-11-05 05:22:31 +00:00
|
|
|
import { env } from "@sourcebot/shared";
|
2025-10-18 23:31:22 +00:00
|
|
|
import path from "path";
|
2024-10-17 20:31:18 +00:00
|
|
|
|
2025-10-29 04:31:28 +00:00
|
|
|
export const SINGLE_TENANT_ORG_ID = 1;
|
|
|
|
|
|
2025-10-31 20:08:51 +00:00
|
|
|
export const PERMISSION_SYNC_SUPPORTED_CODE_HOST_TYPES: CodeHostType[] = [
|
2025-09-20 23:51:14 +00:00
|
|
|
'github',
|
2025-10-30 18:08:10 +00:00
|
|
|
'gitlab',
|
2025-10-18 23:31:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export const REPOS_CACHE_DIR = path.join(env.DATA_CACHE_DIR, 'repos');
|
2025-11-12 04:11:59 +00:00
|
|
|
export const INDEX_CACHE_DIR = path.join(env.DATA_CACHE_DIR, 'index');
|
|
|
|
|
|
|
|
|
|
// Maximum time to wait for current job to finish
|
|
|
|
|
export const GROUPMQ_WORKER_STOP_GRACEFUL_TIMEOUT_MS = 5 * 1000; // 5 seconds
|
|
|
|
|
|
|
|
|
|
// List of shutdown signals
|
|
|
|
|
export const SHUTDOWN_SIGNALS: string[] = [
|
|
|
|
|
'SIGHUP',
|
|
|
|
|
'SIGINT',
|
|
|
|
|
'SIGQUIT',
|
|
|
|
|
'SIGILL',
|
|
|
|
|
'SIGTRAP',
|
|
|
|
|
'SIGABRT',
|
|
|
|
|
'SIGBUS',
|
|
|
|
|
'SIGFPE',
|
|
|
|
|
'SIGSEGV',
|
|
|
|
|
'SIGUSR2',
|
|
|
|
|
'SIGTERM',
|
|
|
|
|
// @note: SIGKILL and SIGSTOP cannot have listeners installed.
|
|
|
|
|
// @see: https://nodejs.org/api/process.html#signal-events
|
|
|
|
|
];
|