From fa52883f424c95dcde16e9056631041af4c479c7 Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Fri, 6 Jan 2023 14:16:35 -0500 Subject: callback support for deduped save --- cgi/servers.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cgi/servers.go') diff --git a/cgi/servers.go b/cgi/servers.go index 06cd72f..9d08b6c 100644 --- a/cgi/servers.go +++ b/cgi/servers.go @@ -115,7 +115,9 @@ func processTick(h config.Handler, output []byte, persister *models.Persister, l if len(extractedContent) != 0 { log.Debugf("extracted content '%s'", extractedContent) outboxItem := models.CreateOutboxItem(h, []byte(extractedContent)) - err = persister.Store(outboxItem) + err = persister.StoreWithCallback(outboxItem, func() { + log.With("handler", h.Name).Debug("callback for save") + }) if err != nil { return err } -- cgit v1.2.3