forked from public/mirror-checker
parent
4b3f85374e
commit
0fc80fd972
@ -0,0 +1,21 @@ |
||||
""" |
||||
Contains Ceph class |
||||
""" |
||||
|
||||
from distro import Distro |
||||
from shared import CSC_MIRROR, get_sec |
||||
|
||||
class Ceph(Distro): |
||||
"""Ceph class""" |
||||
@staticmethod |
||||
def name(): |
||||
"""Get name of Ceph""" |
||||
return "Ceph" |
||||
|
||||
@staticmethod |
||||
def check(): |
||||
"""Check if Ceph packages are up-to-date""" |
||||
official_sec = get_sec("https://download.ceph.com/timestamp") |
||||
csc_sec = get_sec(f"{CSC_MIRROR}ceph/timestamp") |
||||
# Out-of-sync by 1 day maximum |
||||
return official_sec < csc_sec + 86400 |
Loading…
Reference in new issue