Skip to content

Commit 60ef08b

Browse files
committed
Move get ip into start worker script
1 parent e072dcb commit 60ef08b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

components/clp-py-utils/clp_py_utils/start-spider-worker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import logging
33
import os
44
import pathlib
5+
import socket
56
import subprocess
67

78
# Setup logging
@@ -25,7 +26,6 @@ def parse_args() -> argparse.Namespace:
2526
"--concurrency", type=int, default=1, help="Number of concurrent spider workers."
2627
)
2728
parser.add_argument("--storage-url", type=str, required=True, help="Spider storage URL.")
28-
parser.add_argument("--host", type=str, required=True, help="Worker host address.")
2929
return parser.parse_args()
3030

3131

@@ -38,7 +38,7 @@ def main() -> None:
3838
logger.error("Concurrency must be at least 1.")
3939
exit(1)
4040
storage_url = args.storage_url
41-
host = args.host
41+
host = socket.gethostbyname(socket.gethostname())
4242

4343
clp_home = os.getenv("CLP_HOME", "/opt/clp")
4444
spider_worker_path = pathlib.Path(clp_home) / "bin" / "spider_worker"

tools/deployment/package/docker-compose-all.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ services:
331331
${SPIDER_DB_NAME:-spider-db}?\
332332
user=${SPIDER_DB_USER:?Please set a value.}\
333333
&password=${SPIDER_DB_PASS:?Please set a value.}",
334-
# NOTE: Leave host to spider scheduler's host. This only affects task placement.
335-
"--host", "spider-scheduler",
336334
]
337335

338336
webui:

0 commit comments

Comments
 (0)