fix the ENV logic
This commit is contained in:
parent
9754e32858
commit
a57e9cff06
|
@ -28,13 +28,13 @@ func (r *RepoList) Watchdog(f func()) {
|
||||||
MyTicker(1*time.Second, "newScan()", func() {
|
MyTicker(1*time.Second, "newScan()", func() {
|
||||||
i += 1
|
i += 1
|
||||||
// check if the env var is set to autoscan
|
// check if the env var is set to autoscan
|
||||||
if os.Getenv("REPO_AUTO_SCAN") != "" {
|
if os.Getenv("REPO_AUTO_SCAN") != "true" {
|
||||||
if i < delay {
|
if i < delay {
|
||||||
i = delay
|
i = delay
|
||||||
}
|
}
|
||||||
// print every 'delay' seconds
|
// print every 'delay' seconds
|
||||||
if i%delay == 0 {
|
if i%delay == 0 {
|
||||||
log.Info("Not auto scanning", i)
|
log.Info("Not auto scanning", i, "REPO_AUTO_SCAN =", os.Getenv("REPO_AUTO_SCAN"))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue