mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2025-01-08 03:49:27 +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")
|
return errors.New("Invalid node")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
now := time.Now()
|
||||||
|
|
||||||
qInsertLog := `
|
qInsertLog := `
|
||||||
INSERT INTO tbl_probe_log (
|
INSERT INTO tbl_probe_log (
|
||||||
node_id,
|
node_id,
|
||||||
|
@ -205,14 +207,13 @@ func (r *MoneroRepo) ProcessJob(report ProbeReport, proberId int64) error {
|
||||||
report.NodeInfo.DatabaseSize,
|
report.NodeInfo.DatabaseSize,
|
||||||
report.NodeInfo.Difficulty,
|
report.NodeInfo.Difficulty,
|
||||||
report.NodeInfo.EstimateFee,
|
report.NodeInfo.EstimateFee,
|
||||||
time.Now().Unix(),
|
now.Unix(),
|
||||||
report.Message,
|
report.Message,
|
||||||
report.TookTime)
|
report.TookTime)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
now := time.Now()
|
|
||||||
limitTs := now.AddDate(0, -1, 0).Unix()
|
limitTs := now.AddDate(0, -1, 0).Unix()
|
||||||
|
|
||||||
nodeStats := struct {
|
nodeStats := struct {
|
||||||
|
|
Loading…
Reference in a new issue