summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-04-21 21:14:58 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-04-21 21:14:58 -0700
commit9d96d1a9422b30dd6caa42cca2a561970735f160 (patch)
tree3a548002293bf8a79514134437f718484a10193b /main.go
parentbef72712c271e7628342521985d68f418dcf0343 (diff)
downloadbackup-notify-9d96d1a9422b30dd6caa42cca2a561970735f160.tar.gz
backup-notify-9d96d1a9422b30dd6caa42cca2a561970735f160.zip
notify when we don't receive a thing in the last 24 hours
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/main.go b/main.go
index b66bac6..6ddf6b7 100644
--- a/main.go
+++ b/main.go
@@ -37,16 +37,15 @@ func main() {
}
if argv.Scheduler {
- scheduler.StartScheduler(dbConn)
+ scheduler.StartScheduler(dbConn, argv)
}
if argv.NtfyEndpoint != "" {
- ntfy := ntfy.MakeNtfyWatcher(argv.NtfyEndpoint, argv.NtfyTopics)
+ ntfy := ntfy.MakeNtfyWatcher(argv.NtfyEndpoint, argv.NtfyBackupTopics)
notifications := ntfy.Watch()
go func() {
for notification := range notifications {
- // message type is a struct, so we can marshal it to JSON
message := notification.Text
messageStruct := struct {
Id string `json:"id"`