Commit d11fb826 authored by Roland Moser's avatar Roland Moser
Browse files

references #629: spotlight archive consistency


git-svn-id: file:///tmp/cmsos_migration/cmsos.svndb/releases/baseline9/trunk@15862 c528359e-2999-456a-ae53-7ba8edf254b3
parent 0674d731
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#define SENTINELSPOTLIGHT_VERSION_MAJOR 4 #define SENTINELSPOTLIGHT_VERSION_MAJOR 4
#define SENTINELSPOTLIGHT_VERSION_MINOR 0 #define SENTINELSPOTLIGHT_VERSION_MINOR 0
#define SENTINELSPOTLIGHT_VERSION_PATCH 2 #define SENTINELSPOTLIGHT_VERSION_PATCH 3
// If any previous versions available E.g. #define SENTINELSPOTLIGHT_PREVIOUS_VERSIONS "3.8.0,3.8.1" // If any previous versions available E.g. #define SENTINELSPOTLIGHT_PREVIOUS_VERSIONS "3.8.0,3.8.1"
#define SENTINELSPOTLIGHT_PREVIOUS_VERSIONS "4.0.0,4.0.1" #define SENTINELSPOTLIGHT_PREVIOUS_VERSIONS "4.0.0,4.0.1,4.0.2"
// //
......
...@@ -554,8 +554,14 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep ...@@ -554,8 +554,14 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep
{ {
XCEPT_RAISE(sentinel::spotlight::exception::FailedToStore, "Failed to bind message value to insert catalog statement"); XCEPT_RAISE(sentinel::spotlight::exception::FailedToStore, "Failed to bind message value to insert catalog statement");
} }
std::string propschema = properties.getProperty("qualifiedErrorSchemaURI");
if( propschema == "" )
{
propschema = properties.getProperty("schema");
}
if (sqlite3_bind_text(insertCatalogStmt_,8, properties.getProperty("qualifiedErrorSchemaURI").c_str(), properties.getProperty("qualifiedErrorSchemaURI").length(), SQLITE_STATIC) != SQLITE_OK) if (sqlite3_bind_text(insertCatalogStmt_,8, propschema.c_str(), propschema.length(), SQLITE_STATIC) != SQLITE_OK)
{ {
XCEPT_RAISE(sentinel::spotlight::exception::FailedToStore, "Failed to bind schema value to insert catalog statement"); XCEPT_RAISE(sentinel::spotlight::exception::FailedToStore, "Failed to bind schema value to insert catalog statement");
} }
...@@ -570,9 +576,8 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep ...@@ -570,9 +576,8 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep
XCEPT_RAISE(sentinel::spotlight::exception::FailedToStore, "Failed to bind tag value to insert catalog statement"); XCEPT_RAISE(sentinel::spotlight::exception::FailedToStore, "Failed to bind tag value to insert catalog statement");
} }
std::string version = PACKAGE_VERSION_STRING(SENTINELSPOTLIGHT_VERSION_MAJOR,SENTINELSPOTLIGHT_VERSION_MINOR,SENTINELSPOTLIGHT_VERSION_PATCH);
if (sqlite3_bind_text(insertCatalogStmt_,11, properties.getProperty("version").c_str(), properties.getProperty("version").length(), SQLITE_STATIC) != SQLITE_OK)
if (sqlite3_bind_text(insertCatalogStmt_,11, version.c_str(), version.length(), SQLITE_STATIC) != SQLITE_OK)
{ {
XCEPT_RAISE(sentinel::spotlight::exception::FailedToStore, "Failed to bind tag value to insert catalog statement"); XCEPT_RAISE(sentinel::spotlight::exception::FailedToStore, "Failed to bind tag value to insert catalog statement");
} }
...@@ -605,11 +610,6 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep ...@@ -605,11 +610,6 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep
//std::cout << "QualifiedErrorSchemaURI: " << properties.getProperty("qualifiedErrorSchemaURI") << std::endl; //std::cout << "QualifiedErrorSchemaURI: " << properties.getProperty("qualifiedErrorSchemaURI") << std::endl;
std::string propschema = properties.getProperty("qualifiedErrorSchemaURI");
if( propschema == "" )
{
propschema = properties.getProperty("schema");
}
// This exception is qualified as a XDAQ application exception, therefore add specific schema property into xdaq-application table // This exception is qualified as a XDAQ application exception, therefore add specific schema property into xdaq-application table
if ( propschema == "http://xdaq.web.cern.ch/xdaq/xsd/2005/QualifiedSoftwareErrorRecord-10.xsd" ) if ( propschema == "http://xdaq.web.cern.ch/xdaq/xsd/2005/QualifiedSoftwareErrorRecord-10.xsd" )
...@@ -636,7 +636,7 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep ...@@ -636,7 +636,7 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep
std::string propid = properties.getProperty("urn:xdaq-application:id"); std::string propid = properties.getProperty("urn:xdaq-application:id");
if( propid == "" ) if( propid == "" )
{ {
propid = properties.getProperty("id"); propid = properties.getProperty("lid");
} }
std::string propcontext = properties.getProperty("urn:xdaq-application:context"); std::string propcontext = properties.getProperty("urn:xdaq-application:context");
...@@ -648,7 +648,7 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep ...@@ -648,7 +648,7 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep
std::string propgroup = properties.getProperty("urn:xdaq-application:group"); std::string propgroup = properties.getProperty("urn:xdaq-application:group");
if( propgroup == "" ) if( propgroup == "" )
{ {
propgroup = properties.getProperty("group"); propgroup = properties.getProperty("groups");
} }
std::string propservice = properties.getProperty("urn:xdaq-application:service"); std::string propservice = properties.getProperty("urn:xdaq-application:service");
...@@ -1032,9 +1032,13 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep ...@@ -1032,9 +1032,13 @@ throw (sentinel::spotlight::exception::FailedToStore, sentinel::spotlight::excep
// //
toolbox::Properties properties; toolbox::Properties properties;
std::stringstream version;
version << SENTINELSPOTLIGHT_VERSION_MAJOR << "." << SENTINELSPOTLIGHT_VERSION_MINOR << "." << SENTINELSPOTLIGHT_VERSION_PATCH;
properties.setProperty("version", version.str());
std::stringstream storeTimeStream; std::stringstream storeTimeStream;
storeTimeStream << std::fixed << std::setprecision(6) << (double)lastExceptionTime_; storeTimeStream << std::fixed << std::setprecision(6) << (double)lastExceptionTime_;
properties.setProperty("storeTime", storeTimeStream.str()); properties.setProperty("storeTime", storeTimeStream.str());
// for fire event this identify the originator // for fire event this identify the originator
properties.setProperty("source", ex.getProperty("notifier") ); properties.setProperty("source", ex.getProperty("notifier") );
......
Supports Markdown
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