Skip to content

Commit

Permalink
fix: log id
Browse files Browse the repository at this point in the history
  • Loading branch information
sunhongtao committed Jan 22, 2024
1 parent f2f29f6 commit 5ccecbd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/blockchain/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

func main() {
var configPath string
flag.StringVar(&configPath, "blockchain", "./cmd/blockchain/config_tron.json", "The system file of config")
flag.StringVar(&configPath, "blockchain", "./cmd/blockchain/config_xrp.json", "The system file of config")
flag.Parse()
if len(configPath) < 1 {
panic("can not find config file")
Expand Down
2 changes: 1 addition & 1 deletion cmd/blockchain/config_filecoin.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"Nodes": [
{
"BlockChain": 301,
"BlockChain": 2307,
"NodeUrl": "https://api.node.glif.io/rpc/v0",
"NodeToken": ""
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/blockchain/config_xrp.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"Nodes": [
{
"BlockChain": 310,
"BlockChain": 144,
"NodeUrl": "https://xrplcluster.com",
"NodeToken": ""
}
Expand Down
10 changes: 5 additions & 5 deletions collect/service/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (c *Cmd) ReadNodeTaskFromKafka(nodeId string, blockChain int, blockCh chan
continue
}
msg := <-receiver
log := c.log.WithFields(logrus.Fields{"model": "Dispatch", "id": time.Now().UnixMilli()})
log := c.log.WithFields(logrus.Fields{"model": "Dispatch", "id": time.Now().UnixNano()})
task := collect.NodeTask{}
err := json.Unmarshal(msg.Value, &task)
if err != nil {
Expand Down Expand Up @@ -226,7 +226,7 @@ func (c *Cmd) HandlerKafkaRespMessage(msList []*kafka.Message) {
//msList := <-kafkaRespCh
ids := make([]string, 0, 20)
log := c.log.WithFields(logrus.Fields{
"id": time.Now().UnixMilli(),
"id": time.Now().UnixNano(),
"model": "HandlerKafkaRespMessage",
})

Expand Down Expand Up @@ -279,7 +279,7 @@ func (c *Cmd) ExecReceiptTask(receiptChan chan *collect.NodeTask, kf chan []*kaf
//执行任务
receiptTask := <-receiptChan
log := c.log.WithFields(logrus.Fields{
"id": time.Now().UnixMilli(),
"id": time.Now().UnixNano(),
"model": "ExecReceiptTask",
})
//log.Printf("receiptTask=%+v", receiptTask)
Expand Down Expand Up @@ -389,7 +389,7 @@ func (c *Cmd) ExecTxTask(txCh chan *collect.NodeTask, kf chan []*kafka.Message)
//执行任务
txTask := <-txCh
log := c.log.WithFields(logrus.Fields{
"id": time.Now().UnixMilli(),
"id": time.Now().UnixNano(),
"model": "ExecTxTask",
})

Expand Down Expand Up @@ -576,7 +576,7 @@ func (c *Cmd) ExecBlockTask(blockCh chan *collect.NodeTask, kf chan []*kafka.Mes
//执行任务
blockTask := <-blockCh
log := c.log.WithFields(logrus.Fields{
"id": time.Now().UnixMilli(),
"id": time.Now().UnixNano(),
"model": "ExecBlockTask",
})
//log.Printf("taskBlock=%+v", blockTask)
Expand Down

0 comments on commit 5ccecbd

Please sign in to comment.