WIP
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using PartSource.Automation.Jobs;
|
||||
using PartSource.Automation.Services;
|
||||
using PartSource.Data.AutoMapper;
|
||||
using PartSource.Data.Contexts;
|
||||
using PartSource.Services;
|
||||
using Ratermania.Automation.DependencyInjection;
|
||||
using Ratermania.Shopify.DependencyInjection;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PartSource.Automation
|
||||
{
|
||||
@@ -63,7 +62,7 @@ namespace PartSource.Automation
|
||||
{
|
||||
options.ApiKey = builder.Configuration["Shopify:ApiKey"];
|
||||
options.ApiSecret = builder.Configuration["Shopify:ApiSecret"];
|
||||
options.ApiVersion = "2024-10";
|
||||
options.ApiVersion = "2025-10";
|
||||
options.ShopDomain = builder.Configuration["Shopify:ShopDomain"];
|
||||
|
||||
//options.ApiKey = "9a533dad460321c6ce8f30bf5b8691ed";
|
||||
@@ -74,7 +73,7 @@ namespace PartSource.Automation
|
||||
|
||||
.AddAutomation(options =>
|
||||
{
|
||||
options.HasBaseInterval(new TimeSpan(0, 5, 0))
|
||||
options.HasBaseInterval(new TimeSpan(24, 0, 0))
|
||||
.HasMaxFailures(5)
|
||||
//.HasJob<TestJob>(options => options.HasInterval(new TimeSpan(7, 0, 0, 0)));
|
||||
//
|
||||
@@ -96,19 +95,19 @@ namespace PartSource.Automation
|
||||
// options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
// .StartsAt(DateTime.Today.AddHours(-24))
|
||||
// )
|
||||
.HasJob<UpdatePricing>(options =>
|
||||
.HasJob<PartsSync>(options =>
|
||||
options.HasInterval(new TimeSpan(24, 0, 0))
|
||||
.StartsAt(DateTime.Today.AddHours(-22))
|
||||
//.HasDependency<ExecuteSsisPackages>()
|
||||
//.HasDependency<ExecuteSsisPackages>()
|
||||
);
|
||||
//.HasJob<BulkUpdateInventory>(options =>
|
||||
// options.HasInterval(new TimeSpan(1, 0, 0))
|
||||
// .StartsAt(DateTime.Today.AddHours(-27))
|
||||
// );
|
||||
//.HasJob<TestJob>(options =>
|
||||
// options.HasInterval(new TimeSpan(1, 0, 0))
|
||||
// .StartsAt(DateTime.Today.AddHours(-27).AddMinutes(30))
|
||||
//);
|
||||
//.HasJob<BulkUpdateInventory>(options =>
|
||||
// options.HasInterval(new TimeSpan(1, 0, 0))
|
||||
// .StartsAt(DateTime.Today.AddHours(-27))
|
||||
// );
|
||||
//.HasJob<TestJob>(options =>
|
||||
// options.HasInterval(new TimeSpan(1, 0, 0))
|
||||
// .StartsAt(DateTime.Today.AddHours(-27).AddMinutes(30))
|
||||
//);
|
||||
|
||||
//.HasJob<PartialInventoryUpdate>(options => options.HasInterval(new TimeSpan(1, 0, 0))
|
||||
//.HasDependency<ExecuteSsisPackages>()
|
||||
@@ -124,9 +123,7 @@ namespace PartSource.Automation
|
||||
.AddSingleton<VehicleService>()
|
||||
.AddSingleton<VehicleFitmentService>()
|
||||
.AddSingleton<NexpartService>()
|
||||
.AddSingleton<PartService>()
|
||||
|
||||
.AddAutoMapper(typeof(PartSourceProfile));
|
||||
.AddSingleton<PartService>();
|
||||
})
|
||||
.ConfigureLogging((builder, logging) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user