mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00
fix(feeds): ttl and correct field types (#259)
This commit is contained in:
parent
5d032dd075
commit
b7d1f216c0
6 changed files with 19 additions and 8 deletions
|
@ -122,10 +122,11 @@ func (j *TorznabJob) getFeed() ([]torznab.FeedItem, error) {
|
|||
|
||||
items = append(items, i)
|
||||
|
||||
ttl := (24 * time.Hour) * 28
|
||||
// set ttl to 1 month
|
||||
ttl := time.Now().AddDate(0, 1, 0)
|
||||
|
||||
if err := j.Repo.Put(j.Name, i.GUID, []byte("test"), ttl); err != nil {
|
||||
j.Log.Error().Err(err).Str("guid", i.GUID).Msg("torznab getFeed: cache.Put: error storing item in cache")
|
||||
if err := j.Repo.Put(j.Name, i.GUID, []byte(i.Title), ttl); err != nil {
|
||||
j.Log.Error().Stack().Err(err).Str("guid", i.GUID).Msg("torznab getFeed: cache.Put: error storing item in cache")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue