aboutsummaryrefslogtreecommitdiffstats
path: root/fetch-status.py
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2024-07-05 15:25:11 +0100
committergarret <garret@airmail.cc>2024-07-05 15:25:11 +0100
commit9b9a7ebde0fb4a3c7c860f55447171f7f68b5833 (patch)
treee514990398ba7f528ed632fc800aaee0c35e77ac /fetch-status.py
parentc461f5efc30fc0b255f4c2ff8940e2b9d310eaf1 (diff)
downloadagora-status-9b9a7ebde0fb4a3c7c860f55447171f7f68b5833.tar.gz
agora-status-9b9a7ebde0fb4a3c7c860f55447171f7f68b5833.tar.bz2
agora-status-9b9a7ebde0fb4a3c7c860f55447171f7f68b5833.zip
overwrite expired cache with newer data
bit of a pain to test because the site does its own caching when you're not logged in, i ended up just putting bogus data into the db
Diffstat (limited to 'fetch-status.py')
-rwxr-xr-xfetch-status.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/fetch-status.py b/fetch-status.py
index 286ffd3..89abc1e 100755
--- a/fetch-status.py
+++ b/fetch-status.py
@@ -109,5 +109,5 @@ elif post_body is None:
check_status = "mystery"
if not cached_result:
- cur.execute("INSERT INTO statuses VALUES(?,?,?,?)", (profile_id, post_body, time.time(), check_status))
+ cur.execute("INSERT OR REPLACE INTO statuses VALUES(?,?,?,?)", (profile_id, post_body, time.time(), check_status))
con.commit()