parent
e963162303
commit
6569631928
8
main.go
8
main.go
|
|
@ -89,6 +89,9 @@ func setNewStates(states map[config.State]struct{}) {
|
|||
conf.States = newstates
|
||||
log.Printf("updating config new states: %+v", conf)
|
||||
config.Set(conf)
|
||||
if err := sendNewStates(conf.States); err != nil {
|
||||
log.Printf("failed to send new states %+v: %v", conf.States, err)
|
||||
}
|
||||
}
|
||||
|
||||
func email() error {
|
||||
|
|
@ -231,3 +234,8 @@ func sendJob(job broker.Job) error {
|
|||
sender := message.NewMatrix()
|
||||
return sender.Send(job.FormatMultilineText())
|
||||
}
|
||||
|
||||
func sendNewStates(states []config.State) error {
|
||||
sender := message.NewMatrix()
|
||||
return sender.Send(fmt.Sprintf("now searching for loads from: %+v", states))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue