Persist metadata to DB, poll download worker, metadata service layer

This commit is contained in:
Alexander
2026-05-08 11:00:04 +02:00
parent 66264e1314
commit 60c94935b2
10 changed files with 489 additions and 58 deletions
+6
View File
@@ -27,6 +27,12 @@ type CacheRefreshWorker struct {
func (w *CacheRefreshWorker) Work(ctx context.Context, job *river.Job[CacheRefreshArgs]) error {
args := job.Args
if w.Cache == nil || w.Indexer == nil {
log.Trace().Str("key", args.Key).Msg("cache disabled, discarding refresh job")
return nil
}
log.Trace().Str("key", args.Key).Int64("job_id", job.ID).Time("ttl_expires", args.TTLExpires).Msg("cache refresh worker started")
if time.Now().After(args.TTLExpires) {