File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 66DEFAULT_KNATIVE_HEADERS = {"Host" : "faasm-worker.faasm.example.com" }
77
88DEFAULT_INVOKE_HOST = "worker"
9+ DEFAULT_PLANNER_HOST = "planner"
910DEFAULT_UPLOAD_HOST = "upload"
1011DEFAULT_INVOKE_PORT = 8080
12+ DEFAULT_PLANNER_PORT = 8081
1113DEFAULT_UPLOAD_PORT = 8002
1214
1315
@@ -45,6 +47,16 @@ def get_faasm_invoke_host_port():
4547 return host , port
4648
4749
50+ def get_faasm_planner_host_port ():
51+ if not faasm_config_exists ():
52+ return DEFAULT_PLANNER_HOST , DEFAULT_PLANNER_PORT
53+
54+ host = get_faasm_ini_value ("Faasm" , "planner_host" )
55+ port = get_faasm_ini_value ("Faasm" , "planner_port" )
56+
57+ return host , port
58+
59+
4860def get_knative_headers ():
4961 if not faasm_config_exists ():
5062 return DEFAULT_KNATIVE_HEADERS
Original file line number Diff line number Diff line change 99from faasmtools .env import PROJ_ROOT
1010from faasmtools .endpoints import (
1111 get_faasm_invoke_host_port ,
12+ get_faasm_planner_host_port ,
1213 get_faasm_upload_host_port ,
1314 get_knative_headers ,
1415)
@@ -151,7 +152,7 @@ def flush(ctx):
151152 Flush the Faasm cluster
152153 """
153154 headers = get_knative_headers ()
154- host , port = get_faasm_invoke_host_port ()
155+ host , port = get_faasm_planner_host_port ()
155156
156157 url = "http://{}:{}" .format (host , port )
157158 data = {"type" : FAABRIC_MSG_TYPE_FLUSH }
You can’t perform that action at this time.
0 commit comments