diff options
| author | horus | 2020-04-19 01:19:50 +0200 |
|---|---|---|
| committer | horus | 2020-04-19 01:19:50 +0200 |
| commit | beac8dc53c1d24293d169097217403c6bc4bbb2f (patch) | |
| tree | fc7ba42987a179164b07d0180740ea96596621ed | |
| parent | 6bf847341dd49a656065f38a48d378a4c8d5d387 (diff) | |
| download | curious-crawler-beac8dc53c1d24293d169097217403c6bc4bbb2f.tar.gz | |
Tracing mysterious bug.
| -rw-r--r-- | main.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -191,7 +191,7 @@ func getStory(id int) (Story, bool) { log.Errorf("Failed to parse and match regex: %s\n", err.Error()) return Story, false } - is_wiki, err := regexp.MatchString("wikipedia.org($|/)", u.Host) + is_wiki, err := regexp.MatchString("(wikipedia.org)($|/)", u.Host) if err != nil { log.Errorf("Failed to parse and match regex: %s\n", err.Error()) return Story, false @@ -307,7 +307,11 @@ func (app *App) updateAllDiscussions() { if 0 == Story.Id { log.Warnf("updateAllDiscussions: Failure getting Story for item_id: %d\n", item_id) } else if Story.Descendants > 10 || Story.Score > 10 { - log.Warnf("%+v\n", Story) + log.Warnf(` + updateAllDiscussions: There is a bug. Can't update discussion with id %d. + NOTE: Is this is happening again, probably the url was changed from wikipedia to a different source. + %+v\n + `, item_id, Story) } return } |
