Added core pricing metafield and status check job

This commit is contained in:
2020-05-07 21:33:16 -04:00
parent ef5e4422c0
commit 9d3eac20dc
19 changed files with 341 additions and 119 deletions

View File

@@ -0,0 +1,37 @@
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, "Partsource.Automation Running");
}
return new AutomationJobResult
{
IsSuccess = true
};
}
}
}