Add logs
This commit is contained in:
parent
75adb7e3c0
commit
15e7b57e12
2 changed files with 7 additions and 6 deletions
|
@ -46,9 +46,9 @@ func NewMatrixClient(config MatrixConfig) (*MatrixClient, error) {
|
|||
}
|
||||
|
||||
return &MatrixClient{
|
||||
*client,
|
||||
config,
|
||||
opaque_room_id,
|
||||
inner: *client,
|
||||
config: config,
|
||||
room_id: opaque_room_id,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
7
main.go
7
main.go
|
@ -183,10 +183,10 @@ func main() {
|
|||
// timed update
|
||||
|
||||
go func() {
|
||||
first_time := true
|
||||
// first_time := true
|
||||
for {
|
||||
err := routineCheck(5 * time.Minute, !first_time)
|
||||
first_time = false
|
||||
err := routineCheck(5*time.Minute, true)
|
||||
// first_time = false
|
||||
if err != nil {
|
||||
log.Printf("Error in routineCheck: %v", err)
|
||||
// idea: maybe should delay here
|
||||
|
@ -236,5 +236,6 @@ func notify(updates []scanner.ServiceStatus) error {
|
|||
_, err := client.SendNotice(fmt.Sprintf("%s is %s!", v.Name, statusString))
|
||||
final_err = errors.Join(final_err, err)
|
||||
}
|
||||
log.Printf("notify: err=%v\n%v", final_err, updates)
|
||||
return final_err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue