Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Commit bd6ac33

Browse files
committed
change gport to rpc port
1 parent 455a800 commit bd6ac33

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,6 @@ def serve(port):
164164

165165
if __name__ == '__main__':
166166
parser = argparse.ArgumentParser(description='Run play maker server')
167-
parser.add_argument('-p', '--g-port', required=False, help='The port of the server', default=50051)
167+
parser.add_argument('-p', '--rpc-port', required=False, help='The port of the server', default=50051)
168168
args = parser.parse_args()
169-
serve(args.g_port)
169+
serve(args.rpc_port)

start-team.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
def run_server_script(args):
1414
# Start the server.py script as a new process group
1515
process = subprocess.Popen(
16-
['python3', 'server.py', '--g-port', args.g_port],
16+
['python3', 'server.py', '--rpc-port', args.rpc_port],
1717
preexec_fn=os.setsid, # Create a new session and set the process group ID
1818
stdout=subprocess.PIPE,
1919
stderr=subprocess.STDOUT # Capture stderr and redirect it to stdout
@@ -23,7 +23,7 @@ def run_server_script(args):
2323
def run_start_script(args):
2424
# Start the start.sh script in its own directory as a new process group
2525
process = subprocess.Popen(
26-
['bash', 'start.sh', '-t', args.team_name, '--g-port', args.g_port],
26+
['bash', 'start.sh', '-t', args.team_name, '--rpc-port', args.rpc_port],
2727
cwd='scripts/proxy', # Corrected directory to where start.sh is located
2828
preexec_fn=os.setsid, # Create a new session and set the process group ID
2929
stdout=subprocess.PIPE,
@@ -47,7 +47,7 @@ def kill_process_group(process):
4747
# Set up argument parsing
4848
parser = argparse.ArgumentParser(description='Run server and team scripts.')
4949
parser.add_argument('-t', '--team_name', required=False, help='The name of the team', default='CLS')
50-
parser.add_argument('--g-port', required=False, help='The port of the server', default='50051')
50+
parser.add_argument('--rpc-port', required=False, help='The port of the server', default='50051')
5151
args = parser.parse_args()
5252

5353
try:

start-team.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ if [! -d scripts/proxy ]; then
99
fi
1010

1111
team_name="CLS"
12-
g_port=50051
12+
rpc_port=50051
1313

1414
# help function
1515
usage() {
1616
echo "Usage: $0 [options]"
1717
echo "Options:"
1818
echo " -t team_name: specify team name"
19-
echo " --g-port GRPC PORT - specifies grpc port (default: 50051)"
19+
echo " --rpc-port RPC PORT - specifies rpc port (default: 50051)"
2020
exit 1
2121
}
2222

@@ -27,8 +27,8 @@ do
2727
team_name=$2
2828
shift
2929
;;
30-
--g-port)
31-
g_port=$2
30+
--rpc-port)
31+
rpc_port=$2
3232
shift
3333
;;
3434
*)
@@ -49,7 +49,7 @@ python3 check_requirements.py
4949

5050
# Start server.py in the background
5151
echo "Starting server.py..."
52-
python3 server.py --g-port $g_port &
52+
python3 server.py --rpc-port $rpc_port &
5353
server_pid=$!
5454

5555
# Function to kill server and team processes on exit
@@ -68,7 +68,7 @@ sleep 2
6868
# Start start.sh script in the correct directory with arguments
6969
echo "Starting start.sh with team name: $team_name and ..."
7070
cd scripts/proxy
71-
bash start.sh -t "$team_name" --g-port $g_port &
71+
bash start.sh -t "$team_name" --rpc-port $rpc_port &
7272
start_pid=$!
7373

7474
# Wait for both background processes to finish

0 commit comments

Comments
 (0)