This commit is contained in:
litagin02
2024-03-08 10:10:53 +09:00
parent 5fda2103ed
commit d024b71340
4 changed files with 6 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ to avoid user dictionary access error
from typing import Optional, Any
from .worker_common import WOKER_PORT
from .worker_common import WORKER_PORT
from .worker_client import WorkerClient
from common.log import logger
@@ -49,7 +49,7 @@ def unset_user_dict():
# initialize module when imported
def initialize(port: int = WOKER_PORT):
def initialize(port: int = WORKER_PORT):
import time
import socket
import sys

View File

@@ -1,12 +1,12 @@
import argparse
from .worker_server import WorkerServer
from .worker_common import WOKER_PORT
from .worker_common import WORKER_PORT
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--port", type=int, default=WOKER_PORT)
parser.add_argument("--port", type=int, default=WORKER_PORT)
args = parser.parse_args()
server = WorkerServer()
server.start_server(port=args.port)

View File

@@ -3,7 +3,7 @@ from enum import IntEnum, auto
import socket
import json
WOKER_PORT: Final[int] = 7861
WORKER_PORT: Final[int] = 7861
HEADER_SIZE: Final[int] = 4