TTL Refresh
CDN links from solodcdn.com have a short TTL. Orinuno keeps them usable
with a scheduled refresher and a separate retry pass for previously failed
decodes.
Two scheduled tasks
Section titled “Two scheduled tasks”Both run inside ParserService on the Spring scheduler:
refreshExpiredLinks— everyorinuno.decoder.refresh-interval-ms(default 1 hour), at an offset of 0.retryFailedDecodes— same interval, offset by 30 minutes.
refreshExpiredLinks
Section titled “refreshExpiredLinks”- Query
kodik_episode_variantfor rows wheremp4_link IS NOT NULLandmp4_link_decoded_at < NOW() - INTERVAL link-ttl-hours HOUR. Batch size is capped byorinuno.decoder.refresh-batch-size(default 50). - For each row, call
KodikVideoDecoderService.decode(kodikLink). - On success,
UPDATE mp4_link = ?, mp4_link_decoded_at = NOW(). - On failure, leave the row untouched — it will be picked up by
retryFailedDecodeson the next tick.
retryFailedDecodes
Section titled “retryFailedDecodes”- Query variants where
mp4_link IS NULL AND kodik_link IS NOT NULL, same batch size. - Decode with
Retry.backoff(maxRetries, 2s)— exponential backoff starting at 2 seconds (2s, 4s, 8s, …). - On success, update
mp4_linkandmp4_link_decoded_at.
| Property | Default | Notes |
|---|---|---|
orinuno.decoder.link-ttl-hours | 20 | Shorter than observed CDN TTL |
orinuno.decoder.refresh-interval-ms | 3600000 | How often to check |
orinuno.decoder.refresh-batch-size | 50 | Max links per cycle, protects the pool from flooding |
orinuno.decoder.max-retries | 3 | Retry attempts per variant |