diff options
author | Adam Mathes <adam@trenchant.org> | 2018-07-07 10:57:09 -0700 |
---|---|---|
committer | Adam Mathes <adam@trenchant.org> | 2018-07-07 10:57:09 -0700 |
commit | c7a4ff975c63cfd6d19eeb5bc56c477e0fe8f906 (patch) | |
tree | 804e1fe7ad48519114e8b52f759725eabf9bfeb3 | |
parent | e319e1062d62ce2f5965f191e0e30802b0bd97fd (diff) | |
download | neko-c7a4ff975c63cfd6d19eeb5bc56c477e0fe8f906.tar.gz neko-c7a4ff975c63cfd6d19eeb5bc56c477e0fe8f906.tar.bz2 neko-c7a4ff975c63cfd6d19eeb5bc56c477e0fe8f906.zip |
fix minutes flag
-rw-r--r-- | main.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -89,13 +89,16 @@ func main() { return } - go backgroundCrawl(minutes) + go backgroundCrawl(config.Config.CrawlMinutes) vlog.Printf("starting web server at 127.0.0.1:%d\n", config.Config.Port) web.Serve() } func backgroundCrawl(minutes int) { + if minutes < 1 { + return + } for { time.Sleep(time.Minute * time.Duration(minutes)) crawler.Crawl() |