Hello, there was a problem trying to expand and deploy the Boke server to multi-process.
this is simple code
server = Server({
#path
},
num_proces = 5 # 5 process
)
server.start()
if __name__ == ''__main__":
server.io_loop.start()
class ServiceHandler(RequestHandler):
def get(self, deploymentID):
args = self.request.arguments
host_endpoint = self.request.host
model_history_id = args.get('modelHistoryID')[0].decode('utf8')
start_time = args.get('startTime')[0].decode('utf8')
end_time = args.get('endTime')[0].decode('utf8')
if args.get('targetMetric') is not None:
target_metric = args.get('targetMetric')[0].decode('utf8')
else:
target_metric = ""
arg = {
"inference_name": deploymentID,
"model_history_id": model_history_id,
"start_time": start_time,
"end_time": end_time,
"target_metric": target_metric
}
template = env.get_template('embed.html')
script = server_document(
f"http://{host_endpoint}/api/v1/deployments/graph-svr/{deploymentID}/servicehealth", arguments=arg)
temp = template.render(script=script, template="Tornado")
self.write(temp)
After running the template, the function of the path registered in server_document operates twice, with the value registered in the argument during the first operation, but the argument is empty during the second operation. I think it’s a problem that occurs because it’s a different process, is that right? Is there a solution?