Skip to content

Commit

Permalink
feat: notify only when promotions are found
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviotech committed May 9, 2023
1 parent c4d7458 commit c9cecfd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ func (c *Crawler) Crawl(ctx context.Context, input CrawlInput) error {

logger.Printf("Found %d promotions, %d matched the regexes.", len(promotions), len(promotionsToNotify))

// if len(promotionsToNotify) == 0 {
// return nil
// }
if len(promotionsToNotify) == 0 {
return nil
}

logger.Printf("Notifying %d promotions to %s.", len(promotionsToNotify), input.EmailToNotify)

Expand Down

0 comments on commit c9cecfd

Please sign in to comment.