add task completion uri
This commit is contained in:
Родитель
5791fbda05
Коммит
899827eb64
|
@ -562,6 +562,11 @@ namespace hpc
|
|||
"Added built-in proxy support",
|
||||
}
|
||||
},
|
||||
{ "2.2.2.0",
|
||||
{
|
||||
"Added task completion uri configuration",
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return versionHistory;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"UseDefaultCA":false,
|
||||
"ClusterAuthenticationKey":"",
|
||||
"HeartbeatUri":"https://{0}:40001/api/evanclv9/computenodereported",
|
||||
"TaskCompletionUri":"http://evanc7:1328/api/evanclv9/taskcompleted",
|
||||
"MetricInstanceIdsUri":"https://{0}:40001/api/evanclv9/getinstanceids",
|
||||
"MetricUri":"udp://EVANCV7.fareast.corp.microsoft.com:9894/api/4aed4836-c0c8-4e92-853d-cac4698582d1/metricreported",
|
||||
"RegisterUri":"https://{0}:40001/api/evanclv9/registerrequested",
|
||||
|
|
|
@ -42,6 +42,7 @@ namespace hpc
|
|||
AddConfigurationItem(std::vector<std::string>, NamingServiceUri);
|
||||
AddConfigurationItem(std::string, MetricUri);
|
||||
AddConfigurationItem(std::string, HeartbeatUri);
|
||||
AddConfigurationItem(std::string, TaskCompletionUri);
|
||||
|
||||
static std::string ResolveRegisterUri()
|
||||
{
|
||||
|
@ -75,7 +76,13 @@ namespace hpc
|
|||
|
||||
static std::string ResolveTaskCompletedUri(const std::string& uri)
|
||||
{
|
||||
return ResolveUri(uri, [](std::shared_ptr<NamingClient> namingClient) { return namingClient->GetServiceLocation(NodeManagerConfig::GetDefaultServiceName()); });
|
||||
std::string configUri = NodeManagerConfig::GetTaskCompletionUri();
|
||||
if (configUri.empty())
|
||||
{
|
||||
configUri = uri;
|
||||
}
|
||||
|
||||
return ResolveUri(configUri, [](std::shared_ptr<NamingClient> namingClient) { return namingClient->GetServiceLocation(NodeManagerConfig::GetDefaultServiceName()); });
|
||||
}
|
||||
|
||||
protected:
|
||||
|
@ -90,7 +97,16 @@ namespace hpc
|
|||
size_t pos = u.find("{0}");
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
return u.replace(pos, 3, resolver(NamingClient::GetInstance(NodeManagerConfig::GetNamingServiceUri())));
|
||||
auto namingServiceUri = NodeManagerConfig::GetNamingServiceUri();
|
||||
if (namingServiceUri.size() > 0)
|
||||
{
|
||||
// only when naming service configured.
|
||||
return u.replace(pos, 3, resolver(NamingClient::GetInstance(NodeManagerConfig::GetNamingServiceUri())));
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
return std::move(u);
|
||||
|
|
|
@ -111,6 +111,8 @@ int main(int argc, char* argv[])
|
|||
RemoteCommunicator rc(executor, config, NodeManagerConfig::GetListeningUri());
|
||||
rc.Open();
|
||||
|
||||
Logger::Info("Main: entering sleep loop.");
|
||||
|
||||
while (true)
|
||||
{
|
||||
sleep(100);
|
||||
|
|
Загрузка…
Ссылка в новой задаче