The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated 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 f68f392a authored by Michael Ott's avatar Michael Ott
Browse files

Introduce new parameter -o to set MQTT timeout

parent 537cf1c0
......@@ -38,10 +38,6 @@
#include "dcdb/version.h"
#include "version.h"
#define SLURMJOBTIMEOUT 60000000000
int msgId = -1;
bool done = false;
......@@ -64,6 +60,7 @@ void usage() {
std::cout << "Options:" << std::endl;
std::cout << " -b<hosts> List of MQTT brokers [default: localhost:1883]" << std::endl;
std::cout << " -q<qos> MQTT QoS to use [default: 0]" << std::endl;
std::cout << " -o<timeout> MQTT timeout in seconds [default: 10]" << std::endl;
std::cout << " -c<hosts> List of Cassandra hosts [default: none]" << std::endl;
std::cout << " -u<username> Cassandra username [default: none]" << std::endl;
std::cout << " -p<password> Cassandra password [default: none]" << std::endl;
......@@ -178,10 +175,11 @@ int main(int argc, char** argv) {
std::string substitution="";
int maxJobLength = -1;
int qos = 0;
int timeout = 10;
uint64_t ts=0;
// Defining options
const char *opts = "b:q:c:u:p:n:t:j:i:s:m:h";
const char *opts = "b:q:o:c:u:p:n:t:j:i:s:m:h";
char ret;
while ((ret = getopt(argc, argv, opts))!=-1) {
......@@ -214,6 +212,9 @@ int main(int argc, char** argv) {
case 'q':
qos = atoi(optarg);
break;
case 'o':
timeout = atoi(optarg);
break;
case 'c':
cassandra = true;
splitHostList(optarg, hostList);
......@@ -446,7 +447,7 @@ int main(int argc, char** argv) {
retCode = 1;
goto exit;
}
} while(!done && getTimestamp() - startTs < SLURMJOBTIMEOUT);
} while(!done && getTimestamp() - startTs < S_TO_NS(timeout));
}
//hasta la vista
......
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