WIP
This commit is contained in:
@@ -17,7 +17,7 @@ namespace PartSource.Automation.Jobs
|
||||
private readonly ILogger<ExecuteSsisPackages> _logger;
|
||||
|
||||
// TODO: set from config
|
||||
private readonly string[] _ssisPackages = {"Parts Price" };
|
||||
private readonly string[] _ssisPackages = {"Parts Availability" };
|
||||
|
||||
public ExecuteSsisPackages(EmailService emailService, IConfiguration configuration, SsisService ssisService, ILogger<ExecuteSsisPackages> logger)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ namespace PartSource.Automation.Jobs
|
||||
{
|
||||
try
|
||||
{
|
||||
_ftpService.Download($"{package}.txt");
|
||||
// _ftpService.Download($"{package}.txt");
|
||||
_ssisService.Execute($"{package}.dtsx");
|
||||
|
||||
_logger.LogInformation($"Execution of SSIS package {package} completed successfully.");
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace PartSource.Automation.Jobs.POC
|
||||
ApplicationSearchResponse response = await _nexpartService.SendRequest<ApplicationSearch, ApplicationSearchResponse>(applicationSearch);
|
||||
if (response.ResponseBody != null)
|
||||
{
|
||||
foreach (App app in response.ResponseBody.App)
|
||||
foreach (App app in ((Apps)response.ResponseBody).App)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace PartSource.Automation.Jobs.POC
|
||||
ApplicationSearchResponse response = await _nexpartService.SendRequest<ApplicationSearch, ApplicationSearchResponse>(applicationSearch);
|
||||
if (response.ResponseBody != null)
|
||||
{
|
||||
foreach (App app in response.ResponseBody.App)
|
||||
foreach (App app in ((Apps)response.ResponseBody).App)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace PartSource.Automation.Jobs
|
||||
fileGroups.Enqueue(fileGroup);
|
||||
}
|
||||
|
||||
Task[] taskArray = new Task[8];
|
||||
Task[] taskArray = new Task[12];
|
||||
|
||||
for (int i = 0; i < taskArray.Length; i++)
|
||||
{
|
||||
@@ -95,10 +95,9 @@ namespace PartSource.Automation.Jobs
|
||||
}
|
||||
|
||||
Task.WaitAll(taskArray);
|
||||
_whiSeoService.SaveNotes(_noteDictionary);
|
||||
|
||||
// _whiSeoService.CreateFitmentView();
|
||||
|
||||
//_whiSeoService.SaveNotes(_noteDictionary);
|
||||
_whiSeoService.CreateFitmentView();
|
||||
}
|
||||
|
||||
public string Decompress(FileInfo fileInfo)
|
||||
|
||||
@@ -77,32 +77,32 @@ namespace PartSource.Automation
|
||||
|
||||
.AddAutomation(options =>
|
||||
{
|
||||
options.HasBaseInterval(new TimeSpan(0, 15, 0))
|
||||
.HasMaxFailures(1)
|
||||
//.HasJob<TestJob>(options => options.HasInterval(new TimeSpan(7, 0, 0, 0)));
|
||||
//
|
||||
//.HasJob<SyncronizeProducts>(options => options.HasInterval(new TimeSpan(24, 0, 0)))
|
||||
// .HasJob<ProcessWhiFitment>(options => options.HasInterval(new TimeSpan(24, 0, 0)));
|
||||
//.HasJob<ProcessWhiVehicles>(options => options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
//.HasDependency<SyncronizeProducts>()
|
||||
//.HasJob<UpdateFitment>(options => options.HasInterval(new TimeSpan(24, 0, 0)));
|
||||
//.HasJob<UpdatePositioning>(options => options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
// .HasDependency<UpdateFitment>()
|
||||
// .HasDependency<ProcessWhiFitment>()
|
||||
// .HasDependency<SyncronizeProducts>()
|
||||
// .StartsAt(DateTime.Today.AddHours(8))
|
||||
//) ;
|
||||
//.HasJob<StatusCheck>(options => options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
// .StartsAt(DateTime.Parse("2021-04-01 08:00:00"))
|
||||
//)
|
||||
//.HasJob<ExecuteSsisPackages>(options =>
|
||||
// options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
// //.StartsAt(DateTime.Today.AddHours(25))
|
||||
// )
|
||||
options.HasBaseInterval(new TimeSpan(0, 1, 0))
|
||||
.HasMaxFailures(1)
|
||||
//.HasJob<TestJob>(options => options.HasInterval(new TimeSpan(7, 0, 0, 0)));
|
||||
//
|
||||
//.HasJob<SyncronizeProducts>(options => options.HasInterval(new TimeSpan(24, 0, 0)))
|
||||
// .HasJob<ProcessWhiFitment>(options => options.HasInterval(new TimeSpan(24, 0, 0)));
|
||||
//.HasJob<ProcessWhiVehicles>(options => options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
//.HasDependency<SyncronizeProducts>()
|
||||
//.HasJob<UpdateFitment>(options => options.HasInterval(new TimeSpan(24, 0, 0)));
|
||||
//.HasJob<UpdatePositioning>(options => options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
// .HasDependency<UpdateFitment>()
|
||||
// .HasDependency<ProcessWhiFitment>()
|
||||
// .HasDependency<SyncronizeProducts>()
|
||||
// .StartsAt(DateTime.Today.AddHours(8))
|
||||
//) ;
|
||||
//.HasJob<StatusCheck>(options => options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
// .StartsAt(DateTime.Parse("2021-04-01 08:00:00"))
|
||||
//)
|
||||
.HasJob<ProcessWhiFitment>(options =>
|
||||
options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
//.StartsAt(DateTime.Today.AddHours(25))
|
||||
// )
|
||||
|
||||
.HasJob<UpdatePricing>(options => options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
//.HasDependency<ExecuteSsisPackages>()
|
||||
// .StartsAt(DateTime.Today.AddHours(28))
|
||||
//.HasJob<UpdatePricing>(options => options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
// .HasDependency<ExecuteSsisPackages>()
|
||||
// // .StartsAt(DateTime.Today.AddHours(28))
|
||||
);
|
||||
//);
|
||||
//.AddApiServer();
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace PartSource.Automation.Services
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
using SqlCommand command2 = new SqlCommand($"exec CreateFitmentIndexes", connection);
|
||||
command.CommandTimeout = 1800;
|
||||
command.CommandTimeout = 3600;
|
||||
command2.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"FitmentDatabase": "Data Source=localhost;Initial Catalog=WhiFitment;Integrated Security=true;TrustServerCertificate=True",
|
||||
"FitmentDatabase": "Data Source=omg-optiplex;Initial Catalog=WhiFitment;User ID=sa;Password=TNG497us?4TW!;TrustServerCertificate=True",
|
||||
"PartSourceDatabase": "Server=tcp:ps-whi.database.windows.net,1433;Initial Catalog=ps-whi-stage;Persist Security Info=False;User ID=ps-whi;Password=9-^*N5dw!6:|.5Q;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"
|
||||
},
|
||||
"emailConfiguration": {
|
||||
|
||||
Reference in New Issue
Block a user