Needed to add StatusCheck to the JobFactory and DI container
This commit is contained in:
@@ -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();
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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>()
|
||||||
|
|||||||
@@ -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"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user