tangled
alpha
login
or
join now
julien.rbrt.fr
/
bskyrss
1
fork
atom
Subscribe and post RSS feeds to Bluesky
rss
bluesky
1
fork
atom
overview
issues
pulls
pipelines
feat: add in-between feed detail
julien.rbrt.fr
2 weeks ago
82d68adb
5c03b421
1/1
ci.yml
success
19d ago
+11
-1
1 changed file
expand all
collapse all
unified
split
main.go
+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
164
-
for _, feed := range m.account.Feeds {
164
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
168
+
}
169
169
+
if i < len(m.account.Feeds)-1 {
170
170
+
opts := m.cfg.Resolved(feed)
171
171
+
if opts.MinDelay > 0 {
172
172
+
select {
173
173
+
case <-ctx.Done():
174
174
+
return nil
175
175
+
case <-time.After(opts.MinDelay):
176
176
+
}
177
177
+
}
168
178
}
169
179
}
170
180
return nil