mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 01:11:07 +03:00
chore: set default concurrency number to #CPU cores - 1 (#22888)
Set default concurrency number to #CPU cores - 1 Co-authored-by: Alex <alex.tran1502@gmail.com> Co-authored-by: Mert <101130780+mertalev@users.noreply.github.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import { serverInfo } from 'src/commands/server-info';
|
|||||||
import { version } from '../package.json';
|
import { version } from '../package.json';
|
||||||
|
|
||||||
const defaultConfigDirectory = path.join(os.homedir(), '.config/immich/');
|
const defaultConfigDirectory = path.join(os.homedir(), '.config/immich/');
|
||||||
|
const defaultConcurrency = Math.max(1, os.cpus().length - 1);
|
||||||
|
|
||||||
const program = new Command()
|
const program = new Command()
|
||||||
.name('immich')
|
.name('immich')
|
||||||
@@ -66,7 +67,7 @@ program
|
|||||||
.addOption(
|
.addOption(
|
||||||
new Option('-c, --concurrency <number>', 'Number of assets to upload at the same time')
|
new Option('-c, --concurrency <number>', 'Number of assets to upload at the same time')
|
||||||
.env('IMMICH_UPLOAD_CONCURRENCY')
|
.env('IMMICH_UPLOAD_CONCURRENCY')
|
||||||
.default(4),
|
.default(defaultConcurrency),
|
||||||
)
|
)
|
||||||
.addOption(
|
.addOption(
|
||||||
new Option('-j, --json-output', 'Output detailed information in json format')
|
new Option('-j, --json-output', 'Output detailed information in json format')
|
||||||
|
|||||||
Reference in New Issue
Block a user