From 9d96d1a9422b30dd6caa42cca2a561970735f160 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 21 Apr 2024 21:14:58 -0700 Subject: notify when we don't receive a thing in the last 24 hours --- args/args.go | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'args') diff --git a/args/args.go b/args/args.go index dd080cb..6d64985 100644 --- a/args/args.go +++ b/args/args.go @@ -13,8 +13,9 @@ type Arguments struct { Migrate bool Scheduler bool - NtfyEndpoint string - NtfyTopics []string + NtfyEndpoint string + NtfyBackupTopics []string + NtfyAlertTopics []string Port int Server bool @@ -29,7 +30,8 @@ func GetArgs() (*Arguments, error) { scheduler := flag.Bool("scheduler", false, "Run scheduled jobs via cron") migrate := flag.Bool("migrate", false, "Run the migrations") ntfyEndpoint := flag.String("ntfy-endpoint", "https://ntfy.sh", "") - ntfyTopics := flag.String("ntfy-topics", "server-backup", "") + ntfyBackupTopics := flag.String("ntfy-topics", "server-backup", "") + ntfyAlertTopics := flag.String("ntfy-alert-topics", "server-backup", "") port := flag.Int("port", 8080, "Port to listen on") server := flag.Bool("server", false, "Run the server") @@ -37,15 +39,16 @@ func GetArgs() (*Arguments, error) { flag.Parse() arguments := &Arguments{ - DatabasePath: *databasePath, - TemplatePath: *templatePath, - StaticPath: *staticPath, - Port: *port, - Server: *server, - Migrate: *migrate, - Scheduler: *scheduler, - NtfyEndpoint: *ntfyEndpoint, - NtfyTopics: strings.Split(*ntfyTopics, ","), + DatabasePath: *databasePath, + TemplatePath: *templatePath, + StaticPath: *staticPath, + Port: *port, + Server: *server, + Migrate: *migrate, + Scheduler: *scheduler, + NtfyEndpoint: *ntfyEndpoint, + NtfyBackupTopics: strings.Split(*ntfyBackupTopics, ","), + NtfyAlertTopics: strings.Split(*ntfyAlertTopics, ","), } return arguments, nil -- cgit v1.2.3-70-g09d2