feat: draw the rest of the owl
This commit is contained in:
parent
e21b725192
commit
2ba848467f
28 changed files with 1538 additions and 448 deletions
16
src/mirrors/tasks.py
Normal file
16
src/mirrors/tasks.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import requests
|
||||
|
||||
from src.database import get_db_session
|
||||
from src.mirrors.service import refresh_mirrors
|
||||
from src.utils import repeat_every
|
||||
|
||||
|
||||
@repeat_every(seconds=600)
|
||||
def update_rsf_mirrors():
|
||||
with get_db_session() as db:
|
||||
r = requests.get(
|
||||
"https://raw.githubusercontent.com/RSF-RWB/collateralfreedom/refs/heads/main/sites.json"
|
||||
)
|
||||
mirrors = r.json()
|
||||
refresh_mirrors(db, -2, mirrors) # Tracking as hardcoded pool -2
|
||||
db.commit()
|
||||
Loading…
Add table
Add a link
Reference in a new issue