From ac9490fb69af8dc23608413cfb9e9aabb9cccd5c Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 23 Jan 2023 19:49:20 +0000 Subject: [PATCH] --- server/generator/SockBotProcessVendorNotifications.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/server/generator/SockBotProcessVendorNotifications.cs b/server/generator/SockBotProcessVendorNotifications.cs index cad8950..72da9f8 100644 --- a/server/generator/SockBotProcessVendorNotifications.cs +++ b/server/generator/SockBotProcessVendorNotifications.cs @@ -60,9 +60,7 @@ namespace Sockeye.Biz foreach (var vn in vnList) { - log.LogDebug($"Processing vendor notification {vn.Id}-{vn.Created}"); - if (string.IsNullOrWhiteSpace(vn.VendorData)) { var err = $"VendorNotification record {vn.Id}-{vn.Created} has no vendor data"; @@ -70,9 +68,13 @@ namespace Sockeye.Biz log.LogError(err); continue; } - //Parse json vendordata - await ParseVendorNotificationData(vn, ct, log); + if (await ParseVendorNotificationData(vn, ct, log)) + { + //success, save vendornotification as processed + vn.Processed = DateTime.UtcNow; + await ct.SaveChangesAsync(); + } } }