From 9d38176eabe7681b33a57ea1bc49c85b68a0cbb9 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Wed, 13 Mar 2024 14:13:19 +0100 Subject: [PATCH] Save dupes to prevent retries --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 18e5033..3d03898 100644 --- a/main.go +++ b/main.go @@ -83,6 +83,11 @@ func main() { if errors.As(err, &dupesErr) { // SendDupesErrorToDiscord(story.ID, dupesErr) log.Println(dupesErr) + // save dupe in db to prevent retries + parentId := dupesErr.Dupes[0].Id + if err := SaveSnItem(parentId, story.ID); err != nil { + SendErrorToDiscord(err) + } continue } SendErrorToDiscord(err)