Persist metadata to DB, poll download worker, metadata service layer
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user