diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-26 00:23:49 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-26 00:23:49 +0200 |
commit | a83e9bd36fc6a934553d93cbcc0edb120321f971 (patch) | |
tree | a9cc04ca3a0f8392f6ccbf470b323794e535ae7a /main.go | |
parent | 87fd0ad3e9309064fe9fda373035f5ce127ae8d8 (diff) | |
download | feed2imap-go-a83e9bd36fc6a934553d93cbcc0edb120321f971.tar.gz feed2imap-go-a83e9bd36fc6a934553d93cbcc0edb120321f971.tar.bz2 feed2imap-go-a83e9bd36fc6a934553d93cbcc0edb120321f971.zip |
Filtering from cache
Diffstat (limited to '')
-rw-r--r-- | main.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -28,6 +28,7 @@ func processFeed(feed *feed.Feed, cfg *config.Config, client *imap.Client, wg *s } if len(mails) == 0 { + feed.MarkSuccess() return } @@ -43,6 +44,8 @@ func processFeed(feed *feed.Feed, cfg *config.Config, client *imap.Client, wg *s } log.Printf("Uploaded %d messages to '%s' @ %s", len(mails), feed.Name, folder) + + feed.MarkSuccess() } func run() error { @@ -82,6 +85,8 @@ func run() error { return fmt.Errorf("No successfull feed fetch.") } + state.Filter() + imapUrl, err := url.Parse(cfg.Target) if err != nil { return fmt.Errorf("parsing 'target': %w", err) |