diff options
author | Julio Capote <jcapote@gmail.com> | 2023-01-06 19:16:35 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2023-01-06 19:16:35 +0000 |
commit | fa52883f424c95dcde16e9056631041af4c479c7 (patch) | |
tree | f7a4c71deac75348af65c836b1c88afb36df43dd /cgi/servers.go | |
parent | ca12c0d26c987e67deade02bdf645fda8af30016 (diff) | |
download | communique-fa52883f424c95dcde16e9056631041af4c479c7.tar.gz |
callback support for deduped save
Diffstat (limited to 'cgi/servers.go')
-rw-r--r-- | cgi/servers.go | 4 |
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 } |