From 0816eb81f6f62f219ce81f5b69117795ae734edb Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 21 Nov 2024 18:48:57 +0100 Subject: [PATCH] sync unsynced accounts too --- ...e68e7c701fc09875e8152a27cb5dfb3eb1aaaa546cf0e9125e57.json} | 4 ++-- src/store.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename .sqlx/{query-99f7d81310d200e13e81f4262645b2eaa35d2f6140218a6142641f95c335cdaa.json => query-c26330381e58e68e7c701fc09875e8152a27cb5dfb3eb1aaaa546cf0e9125e57.json} (82%) diff --git a/.sqlx/query-99f7d81310d200e13e81f4262645b2eaa35d2f6140218a6142641f95c335cdaa.json b/.sqlx/query-c26330381e58e68e7c701fc09875e8152a27cb5dfb3eb1aaaa546cf0e9125e57.json similarity index 82% rename from .sqlx/query-99f7d81310d200e13e81f4262645b2eaa35d2f6140218a6142641f95c335cdaa.json rename to .sqlx/query-c26330381e58e68e7c701fc09875e8152a27cb5dfb3eb1aaaa546cf0e9125e57.json index 9486201..aea5b80 100644 --- a/.sqlx/query-99f7d81310d200e13e81f4262645b2eaa35d2f6140218a6142641f95c335cdaa.json +++ b/.sqlx/query-c26330381e58e68e7c701fc09875e8152a27cb5dfb3eb1aaaa546cf0e9125e57.json @@ -1,6 +1,6 @@ { "db_name": "SQLite", - "query": "select * from accounts\n where (last_success_at is not null and failure_count < 10 and last_success_at < datetime('now', '-1 days'))\n and failure_count < 10\n limit 10", + "query": "select * from accounts\n where (last_success_at is null or last_success_at < datetime('now', '-1 days'))\n and failure_count < 10\n limit 10", "describe": { "columns": [ { @@ -58,5 +58,5 @@ false ] }, - "hash": "99f7d81310d200e13e81f4262645b2eaa35d2f6140218a6142641f95c335cdaa" + "hash": "c26330381e58e68e7c701fc09875e8152a27cb5dfb3eb1aaaa546cf0e9125e57" } diff --git a/src/store.rs b/src/store.rs index f6475c7..030a58c 100644 --- a/src/store.rs +++ b/src/store.rs @@ -214,7 +214,7 @@ impl Store { let results = sqlx::query_as!( Account, "select * from accounts - where (last_success_at is not null and failure_count < 10 and last_success_at < datetime('now', '-1 days')) + where (last_success_at is null or last_success_at < datetime('now', '-1 days')) and failure_count < 10 limit 10" )