aboutsummaryrefslogtreecommitdiff
path: root/cgi/servers.go
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2023-01-06 19:16:35 +0000
committerJulio Capote <jcapote@gmail.com>2023-01-06 19:16:35 +0000
commitfa52883f424c95dcde16e9056631041af4c479c7 (patch)
treef7a4c71deac75348af65c836b1c88afb36df43dd /cgi/servers.go
parentca12c0d26c987e67deade02bdf645fda8af30016 (diff)
downloadcommunique-fa52883f424c95dcde16e9056631041af4c479c7.tar.gz
callback support for deduped save
Diffstat (limited to '')
-rw-r--r--cgi/servers.go4
1 files changed, 3 insertions, 1 deletions
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
}