Automation and Shopify library updates
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Newtonsoft.Json;
|
||||
@@ -29,9 +30,9 @@ namespace PartSource.Automation.Jobs.POC
|
||||
_shopifyClient = shopifyClient;
|
||||
}
|
||||
|
||||
public async Task Run()
|
||||
public async Task Run(CancellationToken token, params string[] arguments)
|
||||
{
|
||||
// await BuildDatabase();
|
||||
await BuildDatabase();
|
||||
await UpdateShopify();
|
||||
}
|
||||
|
||||
@@ -143,7 +144,6 @@ namespace PartSource.Automation.Jobs.POC
|
||||
}
|
||||
}
|
||||
|
||||
//[SuppressMessage("Globalization", "CA1308:Normalize strings to uppercase", Justification = "It's a Shopify metafield key")]
|
||||
private async Task SavePositionMetafield(Product product, IList<int> vehicleIds, string position)
|
||||
{
|
||||
if (vehicleIds.Count == 0)
|
||||
@@ -169,7 +169,7 @@ namespace PartSource.Automation.Jobs.POC
|
||||
Namespace = "position",
|
||||
Key = key,
|
||||
Value = json,
|
||||
ValueType = "json_string",
|
||||
Type = "json",
|
||||
OwnerResource = "product",
|
||||
OwnerId = product.Id
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user