mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2025-01-07 03:19:35 +00:00
Only call time.Now() once
This commit is contained in:
parent
a0ff254f55
commit
85f3169689
1 changed files with 3 additions and 2 deletions
|
@ -170,6 +170,8 @@ func (r *MoneroRepo) ProcessJob(report ProbeReport, proberId int64) error {
|
|||
return errors.New("Invalid node")
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
|
||||
qInsertLog := `
|
||||
INSERT INTO tbl_probe_log (
|
||||
node_id,
|
||||
|
@ -205,14 +207,13 @@ func (r *MoneroRepo) ProcessJob(report ProbeReport, proberId int64) error {
|
|||
report.NodeInfo.DatabaseSize,
|
||||
report.NodeInfo.Difficulty,
|
||||
report.NodeInfo.EstimateFee,
|
||||
time.Now().Unix(),
|
||||
now.Unix(),
|
||||
report.Message,
|
||||
report.TookTime)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
now := time.Now()
|
||||
limitTs := now.AddDate(0, -1, 0).Unix()
|
||||
|
||||
nodeStats := struct {
|
||||
|
|
Loading…
Reference in a new issue