Skip to content

Commit

Permalink
Set pgsql exporter round from db on init (#1177)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Warehime authored Aug 12, 2022
1 parent 34986db commit 959c576
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exporters/postgresql/postgresql_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ func (exp *postgresqlExporter) Init(cfg plugins.PluginConfig, logger *logrus.Log
}
exp.db = db
<-ready
if rnd, err := exp.db.GetNextRoundToAccount(); err == nil {
exp.round = rnd
}
return err
}

Expand Down

0 comments on commit 959c576

Please sign in to comment.