Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
fix(mqttd): redis key expired
Browse files Browse the repository at this point in the history
  • Loading branch information
a-wing committed Mar 21, 2023
1 parent 565955c commit d04dd12
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mqttd/mqttd.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,14 @@ func (t *Mqtt) Run(ctx context.Context) {
fmt.Sprintf(keyspace, "nodes/*"),
fmt.Sprintf(keyspace, "tasks/*"),
).Channel()

for {
select {
case m := <-ch:
log.Debugf("%s: message: %s\n", m.Channel, m.Payload)
if m.Payload != "set" {
continue
}

// topic:
// plans/1/running
Expand All @@ -224,6 +228,7 @@ func (t *Mqtt) Run(ctx context.Context) {
raw, err := data.Bytes()
if err != nil {
log.Error(err)
continue
}

// prefix:
Expand Down

0 comments on commit d04dd12

Please sign in to comment.