Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion cloudcheck/providers/akamai.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ class Akamai(BaseCloudProvider):
16625,
16702,
17204,
17334,
18680,
18717,
20189,
Expand All @@ -109,21 +110,30 @@ class Akamai(BaseCloudProvider):
31109,
31110,
31377,
31984,
32787,
33047,
33905,
34164,
34850,
35204,
35993,
35994,
36029,
36183,
39836,
43639,
45700,
45757,
48163,
49249,
49846,
55409,
55770,
63949,
133103,
200005,
213120,
393234,
393560,
]
provider_type = "cdn"
Expand Down
8 changes: 5 additions & 3 deletions scripts/check_last_updated.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
import json
from datetime import datetime, timedelta


def check_last_updated():
with open('cloud_providers.json', 'r') as file:
with open("cloud_providers.json", "r") as file:
data = json.load(file)

one_week_ago = datetime.now() - timedelta(weeks=1)

outdated_providers = []
for provider, details in data.items():
last_updated = datetime.fromisoformat(details['last_updated'])
last_updated = datetime.fromisoformat(details["last_updated"])
if last_updated < one_week_ago:
outdated_providers.append((provider, last_updated))

if outdated_providers:
print("### Outdated Providers ###")
outdated_providers.sort(key=lambda x: x[1])
Expand All @@ -26,5 +27,6 @@ def check_last_updated():
return 1
return 0


if __name__ == "__main__":
exit(check_last_updated())