From cd8a53213bb9b8a4aad9111207bd5a15c90e6de8 Mon Sep 17 00:00:00 2001 From: Simon Shillaker <554768+Shillaker@users.noreply.github.com> Date: Thu, 17 Jun 2021 15:58:41 +0200 Subject: [PATCH] Send response (#117) --- src/scheduler/FunctionCallClient.cpp | 3 +++ src/scheduler/FunctionCallServer.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/scheduler/FunctionCallClient.cpp b/src/scheduler/FunctionCallClient.cpp index a32701e8e..27e974151 100644 --- a/src/scheduler/FunctionCallClient.cpp +++ b/src/scheduler/FunctionCallClient.cpp @@ -102,6 +102,9 @@ void FunctionCallClient::sendFlush() call.set_returnhost(faabric::util::getSystemConfig().endpointHost); SEND_MESSAGE(faabric::scheduler::FunctionCalls::Flush, call); + + // Await the response + awaitResponse(FUNCTION_CALL_PORT + REPLY_PORT_OFFSET); } } diff --git a/src/scheduler/FunctionCallServer.cpp b/src/scheduler/FunctionCallServer.cpp index 93640e519..e17a13b06 100644 --- a/src/scheduler/FunctionCallServer.cpp +++ b/src/scheduler/FunctionCallServer.cpp @@ -54,6 +54,9 @@ void FunctionCallServer::recvFlush(faabric::transport::Message& body) // Clear the scheduler scheduler.flushLocally(); + + faabric::EmptyResponse response; + SEND_SERVER_RESPONSE(response, msg.returnhost(), FUNCTION_CALL_PORT) } void FunctionCallServer::recvExecuteFunctions(faabric::transport::Message& body)