Skip to content

Commit

Permalink
Also clear out credentials when tasks are stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
elffjs committed Nov 6, 2024
1 parent 7335acf commit b13fa5b
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,18 @@ func stopTaskByKey(settings *config.Settings, taskKey string, producer sarama.Sy
return err
}

_, _, err = producer.SendMessage(
&sarama.ProducerMessage{
Topic: settings.TaskStopTopic,
Key: sarama.StringEncoder(taskKey),
Value: sarama.ByteEncoder(ttb),
err = producer.SendMessages(
[]*sarama.ProducerMessage{
{
Topic: settings.TaskStopTopic,
Key: sarama.StringEncoder(taskKey),
Value: sarama.ByteEncoder(ttb),
},
{
Topic: settings.TaskCredentialTopic,
Key: sarama.StringEncoder(taskKey),
Value: nil,
},
},
)

Expand Down

0 comments on commit b13fa5b

Please sign in to comment.