mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 12:25:22 +00:00
33 lines
897 B
TypeScript
33 lines
897 B
TypeScript
import { CodeHostType } from "@sourcebot/db";
|
|
import { env } from "@sourcebot/shared";
|
|
import path from "path";
|
|
|
|
export const SINGLE_TENANT_ORG_ID = 1;
|
|
|
|
export const PERMISSION_SYNC_SUPPORTED_CODE_HOST_TYPES: CodeHostType[] = [
|
|
'github',
|
|
'gitlab',
|
|
];
|
|
|
|
export const REPOS_CACHE_DIR = path.join(env.DATA_CACHE_DIR, 'repos');
|
|
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
|
|
];
|