diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-04-27 21:20:10 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-04-27 21:20:10 +0900 |
| commit | cb00405041ee4714b6e817e9570cfa10ae972840 (patch) | |
| tree | ff98728b3e5e099eb9ac5556eeb407c68e0fc208 /backend/api | |
| parent | 938863425bf8ad6c17e43b3da128f92cf6d6ab63 (diff) | |
| download | feedaka-cb00405041ee4714b6e817e9570cfa10ae972840.tar.gz feedaka-cb00405041ee4714b6e817e9570cfa10ae972840.tar.zst feedaka-cb00405041ee4714b6e817e9570cfa10ae972840.zip | |
Add per-feed fetch_interval_seconds (clamped to [1h, 24h]) that halves
on new articles and grows 1.5x when a fetch yields nothing, replacing
the fixed 1h schedule with the 10min cooldown filter. Scheduler tick
shortened to 30min so the 1h floor is honored with reasonable precision.
Diffstat (limited to 'backend/api')
| -rw-r--r-- | backend/api/handler_feeds.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/api/handler_feeds.go b/backend/api/handler_feeds.go index 4d16e4b..936153e 100644 --- a/backend/api/handler_feeds.go +++ b/backend/api/handler_feeds.go @@ -61,7 +61,7 @@ func (h *Handler) FeedsAddFeed(ctx context.Context, request FeedsAddFeedRequestO return FeedsAddFeed400JSONResponse{Message: fmt.Sprintf("failed to insert feed: %v", err)}, nil } - if err := feed.Sync(ctx, h.Queries, dbFeed.ID, result.Feed); err != nil { + if _, err := feed.Sync(ctx, h.Queries, dbFeed.ID, result.Feed); err != nil { return FeedsAddFeed400JSONResponse{Message: fmt.Sprintf("failed to sync articles: %v", err)}, nil } |
