aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/sapientwindex/main.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/cmd/sapientwindex/main.go b/cmd/sapientwindex/main.go
index 97d89a9..f13d820 100644
--- a/cmd/sapientwindex/main.go
+++ b/cmd/sapientwindex/main.go
@@ -38,14 +38,18 @@ func main() {
Logger: slog.NewLogLogger(slog.Default().Handler(), slog.LevelInfo),
}
- stop, wait, err := graw.Scan(announce, handle, scriptCfg)
- if err != nil {
- log.Fatal(err)
- }
+ for {
+ stop, wait, err := graw.Scan(announce, handle, scriptCfg)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ defer stop()
- defer stop()
+ wait()
- wait()
+ time.Sleep(5 * time.Second)
+ }
}
type announcer struct{}