allow setting separate timeout / max size for imports - fixes #479
This commit is contained in:
@@ -97,6 +97,12 @@ type Source = {
|
||||
perChannelMaxNoteCacheCount?: number;
|
||||
perUserNotificationsMaxCount?: number;
|
||||
deactivateAntennaThreshold?: number;
|
||||
|
||||
import?: {
|
||||
downloadTimeout: number;
|
||||
maxFileSize: number;
|
||||
};
|
||||
|
||||
pidFile: string;
|
||||
};
|
||||
|
||||
@@ -177,6 +183,12 @@ export type Config = {
|
||||
perChannelMaxNoteCacheCount: number;
|
||||
perUserNotificationsMaxCount: number;
|
||||
deactivateAntennaThreshold: number;
|
||||
|
||||
import: {
|
||||
downloadTimeout: number;
|
||||
maxFileSize: number;
|
||||
} | undefined;
|
||||
|
||||
pidFile: string;
|
||||
};
|
||||
|
||||
@@ -284,6 +296,7 @@ export function loadConfig(): Config {
|
||||
perChannelMaxNoteCacheCount: config.perChannelMaxNoteCacheCount ?? 1000,
|
||||
perUserNotificationsMaxCount: config.perUserNotificationsMaxCount ?? 500,
|
||||
deactivateAntennaThreshold: config.deactivateAntennaThreshold ?? (1000 * 60 * 60 * 24 * 7),
|
||||
import: config.import,
|
||||
pidFile: config.pidFile,
|
||||
};
|
||||
}
|
||||
@@ -425,4 +438,5 @@ function applyEnvOverrides(config: Source) {
|
||||
_apply_top([['clusterLimit', 'deliverJobConcurrency', 'inboxJobConcurrency', 'relashionshipJobConcurrency', 'deliverJobPerSec', 'inboxJobPerSec', 'relashionshipJobPerSec', 'deliverJobMaxAttempts', 'inboxJobMaxAttempts']]);
|
||||
_apply_top([['outgoingAddress', 'outgoingAddressFamily', 'proxy', 'proxySmtp', 'mediaProxy', 'videoThumbnailGenerator']]);
|
||||
_apply_top([['maxFileSize', 'maxNoteLength', 'pidFile']]);
|
||||
_apply_top(['import', ['downloadTimeout', 'maxFileSize']]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user