Saving events to Events DB : Fixed bugs when connection string was not defined.
This commit is contained in:
@@ -286,7 +286,7 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
opCompleted = true;
|
||||
if (SaveTracingRecords(batch) != Retv.OK) anyError = true;
|
||||
|
||||
if (anyError)
|
||||
if (anyError && !string.IsNullOrEmpty(Events.DB.ConnectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -302,17 +302,13 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
{
|
||||
log.ErrorFormat("Triggering event(s) failed: {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
|
||||
return Event.ErrorProcessingResults;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (anyError)
|
||||
if (anyError && !string.IsNullOrEmpty(Events.DB.ConnectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -328,13 +324,9 @@ namespace TBF.BenchControl.Output.DB.ProductionTracing
|
||||
{
|
||||
log.ErrorFormat("Triggering event(s) failed: {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
|
||||
return Event.ErrorProcessingResults;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -347,7 +347,7 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
opCompleted = true;
|
||||
}
|
||||
|
||||
if (anyError)
|
||||
if (anyError && !string.IsNullOrEmpty(Events.DB.ConnectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -363,13 +363,9 @@ namespace TBF.BenchControl.Output.DB.SensusOracle
|
||||
{
|
||||
log.ErrorFormat("Triggering event(s) failed: {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
|
||||
return Event.ErrorProcessingResults;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
return anyError ? Event.ErrorProcessingResults : Event.ResultsWritten;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace TBF.BenchControl.Output.FileWriters.IperlLogger
|
||||
opCompleted = true;
|
||||
}
|
||||
|
||||
if (anyError)
|
||||
if (anyError && !string.IsNullOrEmpty(Events.DB.ConnectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -171,13 +171,9 @@ namespace TBF.BenchControl.Output.FileWriters.IperlLogger
|
||||
{
|
||||
log.ErrorFormat("Triggering event(s) failed: {0}", exc.Message);
|
||||
}
|
||||
}
|
||||
|
||||
return Event.ErrorProcessingResults;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Event.ResultsWritten;
|
||||
}
|
||||
return anyError ? Event.ErrorProcessingResults: Event.ResultsWritten;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace TBF.BenchControl.Various.StatisticsMonitoring
|
||||
}
|
||||
}
|
||||
|
||||
if (doTriggerEvents)
|
||||
if (doTriggerEvents && !string.IsNullOrEmpty(Events.DB.ConnectionString))
|
||||
{
|
||||
///
|
||||
/// Trigger events
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace TBF.UI.Calendar
|
||||
log.ErrorFormat("Failed to load or update CustomEvent-s in ServeTriggerEvtCalendarEvents(): {0}", exc.Message);
|
||||
}
|
||||
|
||||
if (eventsToTrigger.Count > 0)
|
||||
if (eventsToTrigger.Count > 0 && !string.IsNullOrEmpty(global::Events.DB.ConnectionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user