aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.go4
-rw-r--r--models/feed/feed.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index 29888b2..d121deb 100644
--- a/main.go
+++ b/main.go
@@ -45,7 +45,6 @@ func main() {
flag.Usage()
return
}
-
// reads config if present and sets defaults
config.Init(configFile)
@@ -89,7 +88,7 @@ func main() {
return
}
- // go backgroundCrawl(config.Config.CrawlMinutes)
+ go backgroundCrawl(config.Config.CrawlMinutes)
vlog.Printf("starting web server at 127.0.0.1:%d\n",
config.Config.Port)
web.Serve()
@@ -99,6 +98,7 @@ func backgroundCrawl(minutes int) {
if minutes < 1 {
return
}
+ vlog.Printf("starting background crawl every %d minutes\n", minutes)
for {
time.Sleep(time.Minute * time.Duration(minutes))
crawler.Crawl()
diff --git a/models/feed/feed.go b/models/feed/feed.go
index ce7aafe..e2730c7 100644
--- a/models/feed/feed.go
+++ b/models/feed/feed.go
@@ -79,7 +79,7 @@ func (f *Feed) Update() {
return
}
- models.DB.Query(`UPDATE feed
+ _, _ = models.DB.Exec(`UPDATE feed
SET title=?, url=?, web_url=?, category=?
WHERE id=?`, f.Title, f.Url, f.WebUrl, f.Category, f.Id)
}