Skip to content

Commit

Permalink
Fix for Database Conversion Executables
Browse files Browse the repository at this point in the history
  • Loading branch information
udotdevelopment committed Nov 28, 2018
1 parent be0b833 commit d0ba0b6
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 36 deletions.
Binary file modified Database Conversion Executable/Caseiro.Mvc.PagedList.dll
Binary file not shown.
Binary file not shown.
Binary file modified Database Conversion Executable/MOE.Common.dll
Binary file not shown.
62 changes: 31 additions & 31 deletions MOE.Common/Business/WatchDog/WatchDogScan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,37 +418,37 @@ private string SortAndAddToMessage(ConcurrentBag<SPMWatchDogErrorEvent> errors)
var ErrorMessage = "";
foreach (var error in SortedErrors)
{
if (!Settings.EmailAllErrors)
{
//List<SPMWatchDogErrorEvent> RecordsFromTheDayBefore = new List<SPMWatchDogErrorEvent>();
//compare to error log to see if this was failing yesterday
if (Settings.WeekdayOnly && ScanDate.DayOfWeek == DayOfWeek.Monday)
RecordsFromTheDayBefore =
watchDogErrorEventRepository.GetSPMWatchDogErrorEventsBetweenDates(ScanDate.AddDays(-3),
ScanDate.AddDays(-2).AddMinutes(-1));
else
RecordsFromTheDayBefore =
watchDogErrorEventRepository.GetSPMWatchDogErrorEventsBetweenDates(ScanDate.AddDays(-1),
ScanDate.AddMinutes(-1));
}
if (Settings.EmailAllErrors || FindMatchingErrorInErrorTable(error) == false )
{
var signalRepository = SignalsRepositoryFactory.Create();
var signal = signalRepository.GetLatestVersionOfSignalBySignalID(error.SignalID);
// Add to email if it was not failing yesterday
ErrorMessage += error.SignalID;
ErrorMessage += " - ";
ErrorMessage += signal.PrimaryName;
ErrorMessage += " & ";
ErrorMessage += signal.SecondaryName;
if (error.Phase > 0)
{
ErrorMessage += " - Phase ";
ErrorMessage += error.Phase;
}
ErrorMessage += " (" + error.Message + ")";
ErrorMessage += "\n";
}
//if (!Settings.EmailAllErrors)
//{
// //List<SPMWatchDogErrorEvent> RecordsFromTheDayBefore = new List<SPMWatchDogErrorEvent>();
// //compare to error log to see if this was failing yesterday
// if (Settings.WeekdayOnly && ScanDate.DayOfWeek == DayOfWeek.Monday)
// RecordsFromTheDayBefore =
// watchDogErrorEventRepository.GetSPMWatchDogErrorEventsBetweenDates(ScanDate.AddDays(-3),
// ScanDate.AddDays(-2).AddMinutes(-1));
// else
// RecordsFromTheDayBefore =
// watchDogErrorEventRepository.GetSPMWatchDogErrorEventsBetweenDates(ScanDate.AddDays(-1),
// ScanDate.AddMinutes(-1));
//}
//if (Settings.EmailAllErrors || FindMatchingErrorInErrorTable(error) == false )
//{
// var signalRepository = SignalsRepositoryFactory.Create();
// var signal = signalRepository.GetLatestVersionOfSignalBySignalID(error.SignalID);
// // Add to email if it was not failing yesterday
// ErrorMessage += error.SignalID;
// ErrorMessage += " - ";
// ErrorMessage += signal.PrimaryName;
// ErrorMessage += " & ";
// ErrorMessage += signal.SecondaryName;
// if (error.Phase > 0)
// {
// ErrorMessage += " - Phase ";
// ErrorMessage += error.Phase;
// }
// ErrorMessage += " (" + error.Message + ")";
// ErrorMessage += "\n";
//}
}
try
{
Expand Down
2 changes: 1 addition & 1 deletion MOE.Common/Migrations/201709281716540_DataAggregation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public override void Up()
DropIndex("dbo.ApproachRouteDetail", new[] { "ApproachID" });
DropIndex("dbo.Detectors", "IX_DetectorIDUnique");
DropIndex("dbo.SPMWatchDogErrorEvents", new[] { "SignalID" });
DropPrimaryKey("Signals", "PK_Signals");
DropPrimaryKey("Signals", "PK_dbo.Signals");

//}

Expand Down
2 changes: 1 addition & 1 deletion MOE.Common/Migrations/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ We estimate that each signal will generate 11.4 MB of data per day.
ScanDayStartHour = 1,
WeekdayOnly = true,
MaximumPedestrianEvents = 200,
EmailAllErrors = false
// EmailAllErrors = false
}
);

Expand Down
4 changes: 2 additions & 2 deletions MOE.Common/Models/WatchDogApplicationSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public class WatchDogApplicationSettings : ApplicationSettings

[Display(Name = "Ped Actuations Threshold (Ped Alarm)")]
public int MaximumPedestrianEvents { get; set; }
[Display(Name = "Email All Watch Dog Errors")]
public bool EmailAllErrors { get; set; }
//[Display(Name = "Email All Watch Dog Errors")]
//public bool EmailAllErrors { get; set; }

//public WatchDogApplicationSettings()
//{
Expand Down
2 changes: 1 addition & 1 deletion SPM/Controllers/AggregateDataExportController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using System.Web.Mvc;
using System.Web.UI.DataVisualization.Charting;
using System.Xml;
using Ionic.Zip;
//using Ionic.Zip;
using MOE.Common.Business;
using MOE.Common.Business.Bins;
using MOE.Common.Business.FilterExtensions;
Expand Down

0 comments on commit d0ba0b6

Please sign in to comment.