From 92af6efc0cb364f5c84e6b52110a6d1e9e5e853d Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sun, 2 Jan 2022 16:35:29 +0100 Subject: [PATCH] notifier plugin: fix failed events recovery the event timestamp is in nanosecons not milliseconds Signed-off-by: Nicola Murino --- sdk/plugin/notifier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/plugin/notifier.go b/sdk/plugin/notifier.go index b3ad40a4..d9e2178f 100644 --- a/sdk/plugin/notifier.go +++ b/sdk/plugin/notifier.go @@ -193,7 +193,7 @@ func (p *notifierPlugin) canQueueEvent(timestamp int64) bool { if p.config.NotifierOptions.RetryMaxTime == 0 { return false } - if time.Now().After(util.GetTimeFromMsecSinceEpoch(timestamp).Add(time.Duration(p.config.NotifierOptions.RetryMaxTime) * time.Second)) { + if time.Now().After(time.Unix(0, timestamp).Add(time.Duration(p.config.NotifierOptions.RetryMaxTime) * time.Second)) { return false } if p.config.NotifierOptions.RetryQueueMaxSize > 0 {