aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/db/models.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-04-27 21:20:10 +0900
committernsfisis <nsfisis@gmail.com>2026-04-27 21:20:10 +0900
commitcb00405041ee4714b6e817e9570cfa10ae972840 (patch)
treeff98728b3e5e099eb9ac5556eeb407c68e0fc208 /backend/db/models.go
parent938863425bf8ad6c17e43b3da128f92cf6d6ab63 (diff)
downloadfeedaka-cb00405041ee4714b6e817e9570cfa10ae972840.tar.gz
feedaka-cb00405041ee4714b6e817e9570cfa10ae972840.tar.zst
feedaka-cb00405041ee4714b6e817e9570cfa10ae972840.zip
feat(backend): adapt feed fetch interval to update frequencyHEADmain
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/db/models.go')
-rw-r--r--backend/db/models.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/backend/db/models.go b/backend/db/models.go
index e397102..342d6a0 100644
--- a/backend/db/models.go
+++ b/backend/db/models.go
@@ -14,12 +14,13 @@ type Article struct {
}
type Feed struct {
- ID int64
- Url string
- Title string
- FetchedAt string
- IsSubscribed int64
- UserID int64
+ ID int64
+ Url string
+ Title string
+ FetchedAt string
+ IsSubscribed int64
+ UserID int64
+ FetchIntervalSeconds int64
}
type User struct {