Skip to content

Commit

Permalink
Decrease duplicated medium.
Browse files Browse the repository at this point in the history
  • Loading branch information
ihciah committed May 1, 2018
1 parent a0a1859 commit 7b25084
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fetchers/tumblr.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ func (f *TumblrFetcher) getUserTimeline(user string, time int64) ([]ReplyMessage
}
imghash := fmt.Sprintf("%s@%s", f.channel_id, strsplit[3])
_, found := f.cache.Get(imghash)
f.cache.Set(imghash, true, cache.DefaultExpiration)
if found {
continue
}
f.cache.Set(imghash, true, cache.DefaultExpiration)

// Blacklist
is_blocked := false
Expand Down
2 changes: 1 addition & 1 deletion fetchers/twitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ func (f *TwitterFetcher) getUserTimeline(user string, time int64) ([]ReplyMessag
}
msgid = fmt.Sprintf("%s@%s", f.channel_id, msgid)
_, found := f.cache.Get(msgid)
f.cache.Set(msgid, true, cache.DefaultExpiration)
if found {
continue
}
f.cache.Set(msgid, true, cache.DefaultExpiration)

resources := make([]Resource, 0, len(tweet.ExtendedEntities.Media))
for _, media := range tweet.ExtendedEntities.Media {
Expand Down

0 comments on commit 7b25084

Please sign in to comment.