summaryrefslogtreecommitdiff
path: root/watchdog.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-18 07:25:16 -0600
committerJeff Carr <[email protected]>2024-02-18 07:25:16 -0600
commit860981e63d535cfed566ac831fc9fd130b1b03fb (patch)
treeb3d48461c302de0e598ab237f2fe4d920e4108f1 /watchdog.go
parent985c42221758e40b2811bdd61d6941bda63dccc1 (diff)
send a function to the watchdog repo scanner
Diffstat (limited to 'watchdog.go')
-rw-r--r--watchdog.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/watchdog.go b/watchdog.go
index e1648c7..9b136f4 100644
--- a/watchdog.go
+++ b/watchdog.go
@@ -21,7 +21,7 @@ import (
// the delay, then the scan will run right away, but if
// you check the checkbox twice in 5 seconds, it won't
// rerun until the delay again
-func (r *RepoList) Watchdog() {
+func (r *RepoList) Watchdog(f func()) {
var delay int = 99
var i int = delay
MyTicker(1*time.Second, "newScan()", func() {
@@ -42,6 +42,7 @@ func (r *RepoList) Watchdog() {
}
i = 0
r.ScanRepositories()
+ f()
})
}