aboutsummaryrefslogtreecommitdiffstats
path: root/edaweb/cache.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2025-04-29 18:51:40 +0100
committerjwansek <eddie.atten.ea29@gmail.com>2025-04-29 18:51:40 +0100
commit0e8ada1eff8799437c9be1bc2af10d6198fa8cad (patch)
tree65d40b0c83fc2477306d561d8b98741e8e6585c6 /edaweb/cache.py
parent9e077a790919e2980111262fbde500a5cee828f8 (diff)
downloadboymoder.blog-0e8ada1eff8799437c9be1bc2af10d6198fa8cad.tar.gz
boymoder.blog-0e8ada1eff8799437c9be1bc2af10d6198fa8cad.zip
Added inline HTML into blogposts, refactored a bit
Diffstat (limited to 'edaweb/cache.py')
-rw-r--r--edaweb/cache.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/edaweb/cache.py b/edaweb/cache.py
new file mode 100644
index 0000000..5b66e43
--- /dev/null
+++ b/edaweb/cache.py
@@ -0,0 +1,18 @@
+import database
+import services
+
+def update_cache():
+ print("Updating cache...")
+ with database.Database() as db:
+ db.update_commit_cache(services.request_recent_commits(since = db.get_last_commit_time()))
+ print("Finished adding github commits...")
+ db.append_qnas(services.scrape_whispa(db.config.get("qnas", "url"), since = db.get_oldest_qna()))
+ print("Finished parsing Q&As...")
+
+ print("Started getting docker information with SSH...")
+ print(services.cache_all_docker_containers(services.CONFIG.get("ssh", "docker_key_path")))
+ print("Finished caching.")
+
+
+if __name__ == "__main__":
+ update_cache() \ No newline at end of file