Various changes

This commit is contained in:
2021-07-31 11:10:33 -04:00
parent 962ad3383f
commit fb6dbdfaa7
8 changed files with 42 additions and 36 deletions

View File

@@ -42,7 +42,7 @@ namespace PartSource.Automation.Jobs
try
{
products = await _shopifyClient.Products.Get(new Dictionary<string, object> { { "limit", 250 } });
products = await _shopifyClient.Products.Get(new Dictionary<string, object> { { "limit", 250 } });//, {"product_type", "CA142-SC130-FL13029_Certified Brake Pads" } });
}
catch (Exception ex)
@@ -51,10 +51,6 @@ namespace PartSource.Automation.Jobs
throw;
}
IList<ImportData> parts = await _partSourceContext.ImportData
.Where(i => i.UpdatedAt <= DateTime.Now.AddDays(-7))
.ToListAsync();
int i = 1;
while (products != null && products.Any())
@@ -65,7 +61,7 @@ namespace PartSource.Automation.Jobs
try
{
importData = parts.FirstOrDefault(parts => parts.ShopifyId == product.Id);
importData = await _partSourceContext.ImportData.FirstOrDefaultAsync(parts => parts.ShopifyId == product.Id);
if (importData == null)
{