Fix last changeset

Change-Id: Ie541e8f6fdbc2b5881df1b3e25afc48d97efaa1b
This commit is contained in:
Geir Horn 2024-01-25 14:21:23 +01:00
parent c6c0d4e702
commit 313cf335dd
5 changed files with 0 additions and 49 deletions

View File

@ -7,11 +7,7 @@
"/home/GHo/Documents/Code/Theron++",
"/opt/AMPL/amplapi/include/",
"${workspaceFolder}/**",
<<<<<<< PATCH SET (21fe96 First release)
"/home/GHo/Documents/Code/Theron++"
=======
"/usr/lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13"
>>>>>>> BASE (719fa3 Add Dockerfile)
],
"defines": [],
"cStandard": "c23",

View File

@ -89,8 +89,6 @@ ExecutionControl::ExecutionControl( const std::string & TheActorName )
Send( StatusMessage( StatusMessage::State::Starting ),
Address( std::string( StatusTopic ) ) );
<<<<<<< PATCH SET (21fe96 First release)
=======
}
// The destructor simply closes the publisher if the network is still active
@ -103,7 +101,6 @@ ExecutionControl::~ExecutionControl( void )
Theron::AMQ::NetworkLayer::TopicSubscription::Action::ClosePublisher,
std::string( StatusTopic )
), GetSessionLayerAddress() );
>>>>>>> BASE (719fa3 Add Dockerfile)
}
} // namespace NebulOuS

View File

@ -42,50 +42,19 @@ namespace NebulOuS
void MetricUpdater::AddMetricSubscription( const MetricTopic & TheMetrics,
const Address OptimiserController )
{
<<<<<<< PATCH SET (21fe96 First release)
if( TheMetrics.is_object() &&
TheMetrics.at( NebulOuS::MetricList ).is_object() )
{
JSON MetricList = TheMetrics.at( NebulOuS::MetricList );
for( const JSON MetricDefinition : MetricList.items() )
{
auto [ MetricRecord, NewMetric ] = MetricValues.try_emplace(
MetricDefinition.at( NebulOuS::MetricName ), JSON() );
if( NewMetric )
Send( Theron::AMQ::NetworkLayer::TopicSubscription(
Theron::AMQ::NetworkLayer::TopicSubscription::Action::Subscription,
MetricRecord->first ),
Theron::AMQ::Network::GetAddress( Theron::Network::Layer::Session) );
}
}
else
=======
if( TheMetrics.is_object() &&
TheMetrics.at( NebulOuS::MetricList ).is_array() )
{
for (auto & MetricRecord : TheMetrics.at( NebulOuS::MetricList ) )
>>>>>>> BASE (719fa3 Add Dockerfile)
{
auto [ MetricRecordPointer, NewMetric ] = MetricValues.try_emplace(
MetricRecord.at( NebulOuS::MetricName ), JSON() );
<<<<<<< PATCH SET (21fe96 First release)
ErrorMessage << "[" << Location.file_name() << " at line " << Location.line()
<< "in function " << Location.function_name() <<"] "
<< "The message to define a new metric subscription is given as "
<< std::endl << TheMetrics.dump(2) << std::endl
<< "this is not as expected!";
throw std::invalid_argument( ErrorMessage.str() );
=======
if( NewMetric )
Send( Theron::AMQ::NetworkLayer::TopicSubscription(
Theron::AMQ::NetworkLayer::TopicSubscription::Action::Subscription,
std::string( MetricValueRootString ) + MetricRecordPointer->first ),
Theron::AMQ::Network::GetAddress( Theron::Network::Layer::Session) );
>>>>>>> BASE (719fa3 Add Dockerfile)
}
}
else
@ -139,12 +108,9 @@ void MetricUpdater::UpdateMetricValue(
Theron::AMQ::TopicName TheTopic
= TheMetricTopic.AsString().erase( 0,
NebulOuS::MetricValueRootString.size() );
<<<<<<< PATCH SET (21fe96 First release)
=======
Output << "The metric: " << TheTopic << " has new value "
<< TheMetricValue[ NebulOuS::ValueLabel ] << std::endl;
>>>>>>> BASE (719fa3 Add Dockerfile)
if( MetricValues.contains( TheTopic ) )
{

View File

@ -88,11 +88,7 @@ constexpr std::string_view TimePoint = "predictionTime";
// defined next.
constexpr std::string_view MetricSubscriptions
<<<<<<< PATCH SET (21fe96 First release)
= "eu.nebulouscloud.monitoring.metric_lists";
=======
= "eu.nebulouscloud.monitoring.metric_list";
>>>>>>> BASE (719fa3 Add Dockerfile)
// The JSON message attribute for the list of metrics is another JSON object
// stored under the following key, see the Event type III defined in

View File

@ -141,13 +141,9 @@ int main( int NumberOfCLIOptions, char ** CLIOptionStrings )
cxxopts::value<unsigned int>()->default_value("5672") )
("S,Solver", "Solver to use, devault Couenne",
cxxopts::value<std::string>()->default_value("couenne") )
<<<<<<< PATCH SET (21fe96 First release)
("U,user", "The user name used for the AMQ Broker connection",
=======
("T,Tenant", "Tenant identifier for messages",
cxxopts::value<std::string>()->default_value("TheTenant"))
("U,User", "The user name used for the AMQ Broker connection",
>>>>>>> BASE (719fa3 Add Dockerfile)
cxxopts::value<std::string>()->default_value("admin") )
("Pw,Password", "The password for the AMQ Broker connection",
cxxopts::value<std::string>()->default_value("admin") )