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:
parent
2b6c339c70
commit
1da946be10
3 changed files with 13 additions and 13 deletions
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue