mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-17 04:30:03 +02:00
ship_processor.go: in processTraces() make a slice of redis.ChannelInterface instead of redis.Key so we don't have to repeat our self.
This commit is contained in:
parent
4b41718c78
commit
93300f01ea
1 changed files with 6 additions and 6 deletions
|
|
@ -94,15 +94,15 @@ func processTraces(traces []*ship.TransactionTraceV0) {
|
|||
continue
|
||||
}
|
||||
|
||||
channels := []redis.Key{
|
||||
redisNs.NewKey(redis.ActionChannel{}),
|
||||
redisNs.NewKey(redis.ActionChannel{Action: string(act.Action)}),
|
||||
redisNs.NewKey(redis.ActionChannel{Contract: string(act.Contract)}),
|
||||
redisNs.NewKey(redis.ActionChannel{Action: string(act.Action), Contract: string(act.Contract)}),
|
||||
channels := []redis.ChannelInterface{
|
||||
redis.ActionChannel{},
|
||||
redis.ActionChannel{Action: string(act.Action)},
|
||||
redis.ActionChannel{Contract: string(act.Contract)},
|
||||
redis.ActionChannel{Action: string(act.Action), Contract: string(act.Contract)},
|
||||
}
|
||||
|
||||
for _, channel := range channels {
|
||||
queueMessage(channel, payload)
|
||||
queueMessage(redisNs.NewKey(channel), payload)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue