From eb0b8d66511a9e240d116e4fd1ddb0fa1e690e8c Mon Sep 17 00:00:00 2001 From: CaptainB Date: Tue, 11 Nov 2025 18:30:21 +0800 Subject: [PATCH] chore: adjust default worker count calculation in command.py --- apps/common/management/commands/services/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/management/commands/services/command.py b/apps/common/management/commands/services/command.py index 4ed5104bb..5dfb7570d 100644 --- a/apps/common/management/commands/services/command.py +++ b/apps/common/management/commands/services/command.py @@ -96,7 +96,7 @@ class BaseActionCommand(BaseCommand): ) parser.add_argument('-d', '--daemon', nargs="?", const=True) parser.add_argument('-w', '--worker', type=int, nargs="?", - default=2 if os.cpu_count() > 6 else math.floor(os.cpu_count() / 2)) + default=3 if os.cpu_count() > 6 else max(1, math.floor(os.cpu_count() / 2))) parser.add_argument('-f', '--force', nargs="?", const=True) def initial_util(self, *args, **options):