mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-21 23:20:24 +00:00
notifier plugin: fix failed events recovery
the event timestamp is in nanosecons not milliseconds Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
6d582a821b
commit
92af6efc0c
1 changed files with 1 additions and 1 deletions
|
@ -193,7 +193,7 @@ func (p *notifierPlugin) canQueueEvent(timestamp int64) bool {
|
||||||
if p.config.NotifierOptions.RetryMaxTime == 0 {
|
if p.config.NotifierOptions.RetryMaxTime == 0 {
|
||||||
return false
|
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
|
return false
|
||||||
}
|
}
|
||||||
if p.config.NotifierOptions.RetryQueueMaxSize > 0 {
|
if p.config.NotifierOptions.RetryQueueMaxSize > 0 {
|
||||||
|
|
Loading…
Reference in a new issue