Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 2cf6acc5 authored by Alessio Netti's avatar Alessio Netti
Browse files

Minor changes

- Fixed a minor issue that caused text corruption when using the -h
option on certain shells
- Collectagent now exits gracefully also when receiving a SIGTERM signal
parent ea5162ee
......@@ -68,6 +68,11 @@ DCDBLog::logger_t lg;
/* Normal termination (SIGINT, CTRL+C) */
void sigHandler(int sig)
{
boost::log::sources::severity_logger<boost::log::trivial::severity_level> lg;
if( sig == SIGINT )
LOG(fatal) << "Received SIGINT";
else if( sig == SIGTERM )
LOG(fatal) << "Received SIGTERM";
keepRunning = 0;
}
......@@ -232,7 +237,8 @@ int mqttCallback(SimpleMQTTMessage *msg)
* Print usage information
*/
void usage() {
globalCA_t& defaults = Configuration("").getGlobal();
Configuration config("");
globalCA_t& defaults = config.getGlobal();
/*
1 2 3 4 5 6 7 8
012345678901234567890123456789012345678901234567890123456789012345678901234567890
......@@ -358,16 +364,16 @@ int main(int argc, char* const argv[]) {
cmdSink->set_filter(boost::log::trivial::severity >= settings.logLevelCmd);
/*
* Catch SIGINT signals to allow for proper server shutdowns.
* Catch SIGINT and SIGTERM signals to allow for proper server shutdowns.
*/
signal(SIGINT, sigHandler);
signal(SIGTERM, sigHandler);
/*
* Catch critical signals to allow for backtraces
*/
signal(SIGABRT, abrtHandler);
signal(SIGSEGV, abrtHandler);
signal(SIGTERM, abrtHandler);
// Daemonizing the collectagent
if(settings.daemonize)
......@@ -491,7 +497,7 @@ int main(int argc, char* const argv[]) {
elapsed = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed += (end.tv_usec - start.tv_usec) / 1000.0;
float publish = msgCtr?(pmsgCtr*100.0)/msgCtr:0;
if (settings.statistics) {
if (settings.statistics && keepRunning) {
LOG(info) << "Performance: " << (readingCtr/elapsed)*1000.0 << " inserts/s, " << (msgCtr/elapsed)*1000.0 << " messages/s (" << publish << "% PUBLISH)";
}
msgCtr = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment