This commit is contained in:
1
main.go
1
main.go
@@ -314,6 +314,7 @@ func subscribeKeyspace(ctx context.Context, rdb *redis.Client, ranger *Ranger) {
|
||||
pubsub := rdb.PSubscribe(ctx, "__keyspace@0__:bl:*", "__keyspace@0__:wl:*")
|
||||
go func() {
|
||||
for msg := range pubsub.Channel() {
|
||||
fmt.Println(msg)
|
||||
key := strings.TrimPrefix(msg.Channel, "__keyspace@0__:")
|
||||
payload := msg.Payload
|
||||
if strings.HasPrefix(key, "wl:") {
|
||||
|
Reference in New Issue
Block a user