Needed to add StatusCheck to the JobFactory and DI container

This commit is contained in:
2020-05-07 22:32:53 -04:00
parent ce27322307
commit 11159eab31
4 changed files with 6 additions and 2 deletions

View File

@@ -29,6 +29,9 @@ namespace PartSource.Automation.Factories
case nameof(DeleteProducts):
return _serviceProvider.GetService<DeleteProducts>();
case nameof(StatusCheck):
return _serviceProvider.GetService<StatusCheck>();
case nameof(TestJob):
return new TestJob();

View File

@@ -25,7 +25,7 @@ namespace PartSource.Automation.Jobs
// TODO: One day it won't just be AT&T numbers
string to = $"{phoneNumber}@txt.att.net";
_emailService.Send(to, string.Empty, "Partsource.Automation Running");
_emailService.Send(to, string.Empty, "The Partsource automation server is running. Check the server for more details.");
}
return new AutomationJobResult

View File

@@ -107,6 +107,7 @@ namespace PartSource.Automation
//.AddSingleton<BackupProducts>()
//.AddSingleton<BuildVehicleCache>()
.AddSingleton<DeleteProducts>()
.AddSingleton<StatusCheck>()
.AddSingleton<UpdateFitment>()
.AddSingleton<UpdatePricing>()
.AddSingleton<UpdatePositioning>()

View File

@@ -2,7 +2,7 @@
"profiles": {
"PartSource.Automation": {
"commandName": "Project",
"commandLineArgs": "AddProducts",
"commandLineArgs": "StatusCheck",
"environmentVariables": {
"PS_AUTOMATION_ENVIRONMENT": "development"
}