Allow disabling auto-rotation for asset origins
This commit is contained in:
parent
fd1f2fe0fc
commit
96d159ae56
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ def auto_deprecate_proxies() -> None:
|
|||
for proxy in proxies:
|
||||
if proxy.origin.destroyed is not None:
|
||||
proxy.deprecate(reason="origin_destroyed")
|
||||
if proxy.origin.assets:
|
||||
if proxy.origin.assets and proxy.origin.auto_rotation:
|
||||
max_age_cutoff = datetime.datetime.utcnow() - datetime.timedelta(
|
||||
days=1, seconds=86400 * random.random()) # nosec: B311
|
||||
if proxy.added < max_age_cutoff:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue