fix: db.py SQL (<>ALL, escape %% in LIKE) + incremental_sync tz-aware compare
This commit is contained in:
@@ -40,6 +40,8 @@ def upsert_records(raw_orders: list) -> dict:
|
||||
def sds_incremental_sync() -> dict:
|
||||
db = SyncDB()
|
||||
latest = db.get_latest_ordered_at("SDS")
|
||||
if latest is not None and latest.tzinfo is not None:
|
||||
latest = latest.replace(tzinfo=None)
|
||||
now = datetime.now()
|
||||
from_dt = floor_to_hour(latest) if latest else floor_to_hour(now)
|
||||
if from_dt >= now:
|
||||
|
||||
Reference in New Issue
Block a user