diff options
author | Wolfgang Müller | 2021-10-21 11:22:01 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-10-21 11:22:01 +0200 |
commit | 3f74ab903d955008c183f0f7c1fd3bcf5875e8c2 (patch) | |
tree | bc9378f9968d4b638d55ecf3432bd3de5b7977f3 | |
parent | 7cd07362c4c13bfd01afa85a4666c491a020f330 (diff) | |
download | quarg-3f74ab903d955008c183f0f7c1fd3bcf5875e8c2.tar.gz |
main: Order by messageid instead of time
Some messages (like pastes) occur at exactly the same time and are
inserted into the database with the same timestamp. quarg will print
these messages in a seemingly random order.
Make sure to use the messageid (which should increase monotonically) to
order messages instead.
-rw-r--r-- | quarg/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/quarg/main.py b/quarg/main.py index 5ba6e3d..9fde869 100644 --- a/quarg/main.py +++ b/quarg/main.py @@ -102,9 +102,9 @@ def prepare_query(session, predicates, args): for predicate in predicates: query = query.filter(predicate) - order = Backlog.time.asc() + order = Backlog.messageid.asc() if args.order == 'desc': - order = Backlog.time.desc() + order = Backlog.messageid.desc() query = query.order_by(order) |