diff options
| author | Jeff Carr <[email protected]> | 2024-02-18 07:25:16 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-18 07:25:16 -0600 |
| commit | 860981e63d535cfed566ac831fc9fd130b1b03fb (patch) | |
| tree | b3d48461c302de0e598ab237f2fe4d920e4108f1 /watchdog.go | |
| parent | 985c42221758e40b2811bdd61d6941bda63dccc1 (diff) | |
send a function to the watchdog repo scanner
Diffstat (limited to 'watchdog.go')
| -rw-r--r-- | watchdog.go | 3 |
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() }) } |
