mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 11:20:37 +09:00
feat(core): merge backup core changes with post-split functionality
This commit is contained in:
parent
7642743e62
commit
83be94361c
25 changed files with 1125 additions and 46 deletions
|
|
@ -54,6 +54,7 @@ export interface Config {
|
|||
storageS3ForcePathStyle: boolean;
|
||||
heartbeatSchedulerEnabled: boolean;
|
||||
heartbeatSchedulerIntervalMs: number;
|
||||
companyDeletionEnabled: boolean;
|
||||
}
|
||||
|
||||
export function loadConfig(): Config {
|
||||
|
|
@ -142,6 +143,11 @@ export function loadConfig(): Config {
|
|||
const allowedHostnames = Array.from(
|
||||
new Set((allowedHostnamesFromEnv ?? fileConfig?.server.allowedHostnames ?? []).map((value) => value.trim().toLowerCase()).filter(Boolean)),
|
||||
);
|
||||
const companyDeletionEnvRaw = process.env.PAPERCLIP_ENABLE_COMPANY_DELETION;
|
||||
const companyDeletionEnabled =
|
||||
companyDeletionEnvRaw !== undefined
|
||||
? companyDeletionEnvRaw === "true"
|
||||
: deploymentMode === "local_trusted";
|
||||
|
||||
return {
|
||||
deploymentMode,
|
||||
|
|
@ -179,5 +185,6 @@ export function loadConfig(): Config {
|
|||
storageS3ForcePathStyle,
|
||||
heartbeatSchedulerEnabled: process.env.HEARTBEAT_SCHEDULER_ENABLED !== "false",
|
||||
heartbeatSchedulerIntervalMs: Math.max(10000, Number(process.env.HEARTBEAT_SCHEDULER_INTERVAL_MS) || 30000),
|
||||
companyDeletionEnabled,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue