diff --git a/.sqlx/query-9d51c90afa966740bbd7801c3e6736821d2ab899a6390ec1b66a2067cbcadc25.json b/.sqlx/query-9d51c90afa966740bbd7801c3e6736821d2ab899a6390ec1b66a2067cbcadc25.json new file mode 100644 index 0000000..771533b --- /dev/null +++ b/.sqlx/query-9d51c90afa966740bbd7801c3e6736821d2ab899a6390ec1b66a2067cbcadc25.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "INSERT OR IGNORE INTO queue (hash, date) VALUES (?, ?)", + "describe": { + "columns": [], + "parameters": { + "Right": 2 + }, + "nullable": [] + }, + "hash": "9d51c90afa966740bbd7801c3e6736821d2ab899a6390ec1b66a2067cbcadc25" +} diff --git a/.sqlx/query-d620ced558e472a5fe22d5ad365cf25726a7bb969acc8b9411a2591ce7bcc92f.json b/.sqlx/query-d620ced558e472a5fe22d5ad365cf25726a7bb969acc8b9411a2591ce7bcc92f.json deleted file mode 100644 index ab261aa..0000000 --- a/.sqlx/query-d620ced558e472a5fe22d5ad365cf25726a7bb969acc8b9411a2591ce7bcc92f.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "SQLite", - "query": "INSERT INTO queue (hash, date) VALUES (?, ?)", - "describe": { - "columns": [], - "parameters": { - "Right": 2 - }, - "nullable": [] - }, - "hash": "d620ced558e472a5fe22d5ad365cf25726a7bb969acc8b9411a2591ce7bcc92f" -} diff --git a/src/server/recurring/queue.rs b/src/server/recurring/queue.rs index f08b758..848ccb6 100644 --- a/src/server/recurring/queue.rs +++ b/src/server/recurring/queue.rs @@ -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, )