Added fetching for Shop Region + OPCODE decoding.
This commit is contained in:
@@ -66,6 +66,7 @@ namespace BodyshopUploader.Utils
|
||||
try
|
||||
{
|
||||
Thread.Sleep(1000);//Allow a small amount of time to pass before processing the queue item so that any writes can finish.
|
||||
await GetOpCodes();
|
||||
DecodeQueueItemJob(item);
|
||||
await UpsertQueueItem(item);
|
||||
}
|
||||
@@ -77,6 +78,26 @@ namespace BodyshopUploader.Utils
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task GetOpCodes()
|
||||
{
|
||||
var r = new GraphQLRequest
|
||||
{
|
||||
Query = @"query MyQuery($key: String!) {
|
||||
masterdata(where: {key: {_eq: $key}}) {
|
||||
value
|
||||
key
|
||||
}
|
||||
}",
|
||||
Variables = new
|
||||
{
|
||||
key = "CA_BC_ciecaopcodes"
|
||||
}
|
||||
};
|
||||
var data = await Utils.GraphQL.ExecuteQuery(r);
|
||||
|
||||
Utils.AppMetaData.CiecaOpCodes = JObject.Parse(data.masterdata[0].value.Value);
|
||||
}
|
||||
|
||||
private static void DecodeQueueItemJob(DTO_QueueItem item)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user