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): case nameof(DeleteProducts):
return _serviceProvider.GetService<DeleteProducts>(); return _serviceProvider.GetService<DeleteProducts>();
case nameof(StatusCheck):
return _serviceProvider.GetService<StatusCheck>();
case nameof(TestJob): case nameof(TestJob):
return new 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 // TODO: One day it won't just be AT&T numbers
string to = $"{phoneNumber}@txt.att.net"; 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 return new AutomationJobResult

View File

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

View File

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