Subscribe and post RSS feeds to Bluesky
rss bluesky

feat: add in-between feed detail

+11 -1
+11 -1
main.go
··· 161 161 162 162 // CheckAndPost checks all feeds for this account and posts new items. 163 163 func (m *AccountManager) CheckAndPost(ctx context.Context) error { 164 - for _, feed := range m.account.Feeds { 164 + for i, feed := range m.account.Feeds { 165 165 if err := m.checkAndPostFeed(ctx, feed); err != nil { 166 166 log.Printf("[@%s] Error checking feed %s: %v", m.account.Handle, feed.URL, err) 167 167 // Continue with other feeds even if one fails. 168 + } 169 + if i < len(m.account.Feeds)-1 { 170 + opts := m.cfg.Resolved(feed) 171 + if opts.MinDelay > 0 { 172 + select { 173 + case <-ctx.Done(): 174 + return nil 175 + case <-time.After(opts.MinDelay): 176 + } 177 + } 168 178 } 169 179 } 170 180 return nil