perf: 优化 url

This commit is contained in:
ibuler
2023-07-19 11:36:42 +08:00
parent f466904a1c
commit 8ed8d6f01c
3 changed files with 12 additions and 10 deletions

View File

@@ -1,8 +1,10 @@
import multiprocessing
from django.core.management.base import BaseCommand, CommandError
from django.core.management.base import BaseCommand
from django.db.models import TextChoices
from .utils import ServicesUtil
from .hands import *
from .utils import ServicesUtil
class Services(TextChoices):
@@ -97,7 +99,7 @@ class BaseActionCommand(BaseCommand):
cores = multiprocessing.cpu_count() * 2 + 1
parser.add_argument(
'services', nargs='+', choices=Services.export_services_values(), help='Service',
'services', nargs='+', choices=Services.export_services_values(), help='Service',
)
parser.add_argument('-d', '--daemon', nargs="?", const=True)
parser.add_argument('-w', '--worker', type=int, nargs="?", default=cores)