From a3284f023cb2882b794aff76b642f11601ceb347 Mon Sep 17 00:00:00 2001 From: Sam Hadow Date: Sun, 10 Mar 2024 00:15:32 +0100 Subject: [PATCH] fixed history fetch (order) + podman example command --- podman-commands | 2 +- src/db.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/podman-commands b/podman-commands index 0991788..a37b341 100644 --- a/podman-commands +++ b/podman-commands @@ -5,6 +5,6 @@ podman pod create --name aliexpress -p 8086:8080 podman run -d --pod=aliexpress -e POSTGRES_DB="aliexpress" -e POSTGRES_USER="postgres" -e POSTGRES_PASSWORD="postgres" -v /home/data/podman/aliexpress/db:/var/lib/postgresql/data:Z --name ali-db docker.io/postgres -podman run -d --pod=aliexpress -e POSTGRES_DB="aliexpress" -e POSTGRES_USER="postgres" -e POSTGRES_PASSWORD="postgres" --name ali-app alipricetrack:1.0.0 +podman run -d --pod=aliexpress -e POSTGRES_DB="aliexpress" -e POSTGRES_USER="postgres" -e POSTGRES_PASSWORD="postgres" -v /home/data/podman/aliexpress/cookies.json:/app/cookies.json:Z --name ali-app alipricetrack:1.0.0 podman run -d --pod=aliexpress --name ali-cron alipricetrack_cron:1.0.0 diff --git a/src/db.py b/src/db.py index 324deae..a35621e 100644 --- a/src/db.py +++ b/src/db.py @@ -72,6 +72,7 @@ def get_history(): cursor.execute(""" SELECT uuid, quantity, discount_percentage, price, currency, h_timestamp FROM history + ORDER BY h_timestamp """) results = cursor.fetchall() cursor.close()