mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 06:10:54 +03:00
data provider: micro-optimization
skip availability check when updating the node timestamp. If the update succeeds, the data provider is healthy Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -84,11 +84,14 @@ func addScheduledCacheUpdates() error {
|
||||
|
||||
func checkDataprovider() {
|
||||
if currentNode != nil {
|
||||
if err := provider.updateNodeTimestamp(); err != nil {
|
||||
err := provider.updateNodeTimestamp()
|
||||
if err != nil {
|
||||
providerLog(logger.LevelError, "unable to update node timestamp: %v", err)
|
||||
} else {
|
||||
providerLog(logger.LevelDebug, "node timestamp updated")
|
||||
}
|
||||
metric.UpdateDataProviderAvailability(err)
|
||||
return
|
||||
}
|
||||
err := provider.checkAvailability()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user