Skip to content

Commit

Permalink
fix: avoid lost of events on transmission failure (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertsoft authored Jun 23, 2023
1 parent 1e75f7b commit c12a3b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions amplitude/plugins/destination/amplitude_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ func (p *amplitudePlugin) sendEventsFromStorage(wg *sync.WaitGroup) {
p.reduceChunkSize()
}

if len(result.EventsForRetry) > 0 {
p.storage.ReturnBack(result.EventsForRetry...)
}

executeCallback := p.config.ExecuteCallback
if executeCallback != nil && len(result.EventsForCallback) > 0 {
go func() {
Expand Down

0 comments on commit c12a3b0

Please sign in to comment.