Migration to DevOps
This commit is contained in:
29
PartSource.Automation/Jobs/StatusCheck.cs
Normal file
29
PartSource.Automation/Jobs/StatusCheck.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using PartSource.Automation.Models;
|
||||
using PartSource.Automation.Services;
|
||||
using Ratermania.Automation.Interfaces;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PartSource.Automation.Jobs
|
||||
{
|
||||
public class StatusCheck : IAutomationJob
|
||||
{
|
||||
private readonly string[] phoneNumbers = { "8593609107", "5134008303" };
|
||||
private readonly EmailService _emailService;
|
||||
|
||||
public StatusCheck(EmailService emailService)
|
||||
{
|
||||
_emailService = emailService;
|
||||
}
|
||||
|
||||
public async Task Run()
|
||||
{
|
||||
foreach (string phoneNumber in phoneNumbers)
|
||||
{
|
||||
// TODO: One day it won't just be AT&T numbers
|
||||
string to = $"{phoneNumber}@txt.att.net";
|
||||
|
||||
_emailService.Send(to, string.Empty, "The Partsource automation server is running. Check the server for more details.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user