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

Add db init command to dcdbconfig for triggering an initSchema() call

parent f7820358
...@@ -42,6 +42,7 @@ void DBAction::printHelp(int argc, char* argv[]) ...@@ -42,6 +42,7 @@ void DBAction::printHelp(int argc, char* argv[])
std::cout << "The DB command has the following options:" << std::endl; std::cout << "The DB command has the following options:" << std::endl;
std::cout << " INSERT <sid> <time> <value> - Insert test data into the data store" << std::endl; std::cout << " INSERT <sid> <time> <value> - Insert test data into the data store" << std::endl;
std::cout << " FUZZYTRUNC <time> - Truncate data that is older than <time>" << std::endl; std::cout << " FUZZYTRUNC <time> - Truncate data that is older than <time>" << std::endl;
std::cout << " INIT - Initialize" << std::endl;
} }
/* /*
...@@ -72,16 +73,16 @@ int DBAction::executeCommand(int argc, char* argv[], int argvidx, const char* ho ...@@ -72,16 +73,16 @@ int DBAction::executeCommand(int argc, char* argv[], int argvidx, const char* ho
goto executeCommandError; goto executeCommandError;
} }
doInsert(argv[argvidx+1], argv[argvidx+2], argv[argvidx+3]); doInsert(argv[argvidx+1], argv[argvidx+2], argv[argvidx+3]);
} } else if (strcasecmp(argv[argvidx], "FUZZYTRUNC") == 0) {
else if (strcasecmp(argv[argvidx], "FUZZYTRUNC") == 0) {
/* FUZZYTRUNC needs one more parameter */ /* FUZZYTRUNC needs one more parameter */
if (argvidx+1 >= argc) { if (argvidx+1 >= argc) {
std::cout << "FUZZYTRUNC needs one more parameter!" << std::endl; std::cout << "FUZZYTRUNC needs one more parameter!" << std::endl;
goto executeCommandError; goto executeCommandError;
} }
doFuzzyTrunc(argv[argvidx+1]); doFuzzyTrunc(argv[argvidx+1]);
} } else if (strcasecmp(argv[argvidx], "INIT") == 0) {
else { doInitSchema();
} else {
std::cout << "Invalid DB command: " << argv[argvidx] << std::endl; std::cout << "Invalid DB command: " << argv[argvidx] << std::endl;
goto executeCommandError; goto executeCommandError;
} }
...@@ -151,3 +152,8 @@ void DBAction::doFuzzyTrunc(std::string timestr) ...@@ -151,3 +152,8 @@ void DBAction::doFuzzyTrunc(std::string timestr)
ds.truncBeforeWeek(ts.getWeekstamp()); ds.truncBeforeWeek(ts.getWeekstamp());
} }
void DBAction::doInitSchema()
{
connection->initSchema();
}
...@@ -51,6 +51,7 @@ protected: ...@@ -51,6 +51,7 @@ protected:
void doInsert(std::string sidstr, std::string timestr, std::string valuestr); void doInsert(std::string sidstr, std::string timestr, std::string valuestr);
void doFuzzyTrunc(std::string timestr); void doFuzzyTrunc(std::string timestr);
void doInitSchema();
}; };
#endif #endif
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