Fix recurring task crash

It would fail when inserting a commit into the queue that was already in
the queue, instead of just skipping that commit.
This commit is contained in:
Joscha 2023-08-14 12:12:13 +02:00
parent 2b6c339c70
commit 1da946be10
3 changed files with 13 additions and 13 deletions

View file

@ -19,7 +19,7 @@ pub async fn update(db: &SqlitePool) -> somehow::Result<()> {
for row in new {
let date = OffsetDateTime::now_utc();
sqlx::query!(
"INSERT INTO queue (hash, date) VALUES (?, ?)",
"INSERT OR IGNORE INTO queue (hash, date) VALUES (?, ?)",
row.hash,
date,
)