forked from ALHP/ALHP.GO
added cli option for check interval
This commit is contained in:
3
main.go
3
main.go
@@ -39,6 +39,7 @@ var (
|
||||
db *ent.Client
|
||||
dbLock sync.RWMutex
|
||||
journalLog = flag.Bool("journal", false, "Log to systemd journal instead of stdout")
|
||||
checkInterval = flag.Int("interval", 5, "How often svn2git should be checked in minutes (default: 5)")
|
||||
)
|
||||
|
||||
func (b *BuildManager) buildWorker(id int) {
|
||||
@@ -590,7 +591,7 @@ func (b *BuildManager) syncWorker() {
|
||||
}
|
||||
|
||||
b.parseWG.Wait()
|
||||
time.Sleep(5 * time.Minute)
|
||||
time.Sleep(time.Duration(*checkInterval) * time.Minute)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user