Skip to content

Commit eb0b8d6

Browse files
committed
chore: adjust default worker count calculation in command.py
1 parent cd89dd6 commit eb0b8d6

File tree

1 file changed

+1
-1
lines changed
  • apps/common/management/commands/services

1 file changed

+1
-1
lines changed

apps/common/management/commands/services/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def add_arguments(self, parser):
9696
)
9797
parser.add_argument('-d', '--daemon', nargs="?", const=True)
9898
parser.add_argument('-w', '--worker', type=int, nargs="?",
99-
default=2 if os.cpu_count() > 6 else math.floor(os.cpu_count() / 2))
99+
default=3 if os.cpu_count() > 6 else max(1, math.floor(os.cpu_count() / 2)))
100100
parser.add_argument('-f', '--force', nargs="?", const=True)
101101

102102
def initial_util(self, *args, **options):

0 commit comments

Comments
 (0)