diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2025-04-27 21:18:34 +0100 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2025-04-27 21:18:34 +0100 |
commit | dd3f431d2f20409ccb490241e70687a5f5c7c79c (patch) | |
tree | 5c3f66ca9a0021b03d5ceddeaa1b5e77503471e7 /cache.py | |
parent | f0a4fd5c9b632633443f8a5bf4475cbf33fed8d5 (diff) | |
download | boymoder.blog-master.tar.gz boymoder.blog-master.zip |
Diffstat (limited to 'cache.py')
-rw-r--r-- | cache.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cache.py b/cache.py new file mode 100644 index 0000000..5b66e43 --- /dev/null +++ b/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 |