From 55fc875d3a614e8218cc8ea396fab59877ad59fe Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Fri, 25 Nov 2022 11:28:35 +0100 Subject: [PATCH] Jobs/GraphQL: Actually insert the status value --- Jobs/GraphQL/GraphQLJob.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Jobs/GraphQL/GraphQLJob.vb b/Jobs/GraphQL/GraphQLJob.vb index 32570952..cd41a417 100644 --- a/Jobs/GraphQL/GraphQLJob.vb +++ b/Jobs/GraphQL/GraphQLJob.vb @@ -223,24 +223,24 @@ Public Class GraphQLJob Try oResultList = oObj.SelectToken(QueryData.MappingBasePath, errorWhenNoMatch:=True) Catch ex As Exception - _Logger.Warn("HandleResponse: Could not find BasePath: [{0}] for query [{1}]", QueryData.MappingBasePath, QueryData.Name) + _Logger.Warn("WriteNewQueryData: Could not find BasePath: [{0}] for query [{1}]", QueryData.MappingBasePath, QueryData.Name) _Logger.Error(ex) Return Nothing End Try If oResultList Is Nothing Then - _Logger.Warn("HandleResponse: Could not find BasePath: [{0}] for query [{1}]", QueryData.MappingBasePath, QueryData.Name) + _Logger.Warn("WriteNewQueryData: Could not find BasePath: [{0}] for query [{1}]", QueryData.MappingBasePath, QueryData.Name) Return Nothing End If - _Logger.Info("HandleResponse: Processing Queue [{0}] with [{1}] Items", QueryData.Name, oResultList.Count) + _Logger.Info("WriteNewQueryData: Processing Queue [{0}] with [{1}] Items", QueryData.Name, oResultList.Count) For Each oResultItem As JToken In oResultList Try ' ADDED_WHO, ADDED_QUERY_ID are system fields which are used to correctly fill ' and delete rows in the destination table without touching rows from other queries - Dim oKeys As New List(Of String) From {"ADDED_WHO", "ADDED_QUERY_ID"} - Dim oValues As New List(Of String) From {JOB_NAME, QueryData.Id} + Dim oKeys As New List(Of String) From {"ADDED_WHO", "ADDED_QUERY_ID", "STATUS"} + Dim oValues As New List(Of String) From {JOB_NAME, QueryData.Id, "1"} For Each oMapping In QueryData.MappingFields Dim oValue As String = String.Empty @@ -251,7 +251,7 @@ Public Class GraphQLJob Dim oToken = oResultItem.SelectToken(oMapping.SourcePath) If oToken Is Nothing Then - _Logger.Warn("HandleResponse: Could not find value at SourcePath: {0}", oMapping.SourcePath) + _Logger.Warn("WriteNewQueryData: Could not find value at SourcePath: {0}", oMapping.SourcePath) oValue = String.Empty Else oValue = oToken.ToString