This is it. Don't get scared now. (Converted to Ratermania.Automation)

This commit is contained in:
2021-01-27 21:04:53 -05:00
parent b0935e9214
commit e1be26d798
29 changed files with 1694 additions and 1025 deletions

View File

@@ -1,37 +0,0 @@
using PartSource.Automation.Jobs.Interfaces;
using PartSource.Automation.Models;
using PartSource.Automation.Services;
using System;
using System.Collections.Generic;
using System.Text;
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<AutomationJobResult> 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.");
}
return new AutomationJobResult
{
IsSuccess = true
};
}
}
}