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 7118a5c5 authored by Michael Ott's avatar Michael Ott
Browse files

Perform fuzzy query if no start and end timestamp are given

parent f3c8edba
......@@ -45,7 +45,7 @@ void usage(void)
if (isatty(fileno(stdin))) {
/* 0---------1---------2---------3---------4---------5---------6---------7--------- */
std::cout << "Usage:" << std::endl;
std::cout << " dcdbquery [-h <host>] [-r] [-l] <Sensor 1> [<Sensor 2> ...] <Start> <End>" << std::endl;
std::cout << " dcdbquery [-h <host>] [-r] [-l] <Sensor 1> [<Sensor 2> ...] [<Start> <End>]" << std::endl;
std::cout << " dcdbquery [-h <host>] [-r] [-l] -j <jobId> <Sensor 1> [<Sensor 2> ...]" << std::endl;
std::cout << std::endl;
std::cout << "Parameters:" << std::endl;
......@@ -103,7 +103,7 @@ int main(int argc, char * const argv[])
}
/* Check command line arguments */
if (argcReal <= 3) {
if (argcReal <= 1) {
usage();
}
......@@ -142,6 +142,7 @@ int main(int argc, char * const argv[])
/* Try to create TimeStamp objects from the arguments */
DCDB::TimeStamp start, end;
if (jobId.size() == 0) {
if (argcReal > 2) {
try {
bool local = myQuery->getLocalTimeEnabled();
start = DCDB::TimeStamp(argvReal[argcReal-2], local);
......@@ -150,9 +151,10 @@ int main(int argc, char * const argv[])
} else {
end = start;
}
argcReal-= 2;
} catch (std::exception& e) {
std::cout << "Wrong time format." << std::endl;
exit(EXIT_FAILURE);
/* The last two parameters could not be parsed as timestamps, let's assume they are sensors and do a fuzzy querry */
start = end = DCDB::TimeStamp();
}
/* Ensure start < end */
......@@ -160,7 +162,7 @@ int main(int argc, char * const argv[])
std::cout << "Start time must be earlier than end time." << std::endl;
exit(EXIT_FAILURE);
}
argcReal-= 2;
}
}
/* Build a list of sensornames */
......
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