Fix request prioritization bug
authorJakob Cornell <jakob+gpg@jcornell.net>
Mon, 26 Sep 2022 18:58:47 +0000 (13:58 -0500)
committerJakob Cornell <jakob+gpg@jcornell.net>
Tue, 27 Sep 2022 23:15:41 +0000 (18:15 -0500)
strikebot/setup.cfg
strikebot/src/strikebot/__init__.py
strikebot/src/strikebot/reddit_api.py

index c22a71f6b741382ec4551b2eb757e032eabf6d9a..21653964d9ce734e87517e9d0d4d90a1fa6264fd 100644 (file)
@@ -1,6 +1,6 @@
 [metadata]
 name = strikebot
-version = 0.0.3
+version = 0.0.4
 
 [options]
 package_dir =
index d9e43023c2739d325e34c4f4cff47333f32e812c..abe60659ae0b6982f45861dbeec24108827e1ab2 100644 (file)
@@ -1,3 +1,5 @@
+"""Count tracking logic."""
+
 from contextlib import nullcontext as nullcontext
 from dataclasses import dataclass
 from functools import total_ordering
index 3e69e6c5730764bfa77f66c0e8df12ba2a25086c..2059707af30a4fc1ceec51cf8561545abde98fa1 100644 (file)
@@ -89,7 +89,7 @@ class DeleteRequest(_Request):
                }
 
        def _subtype_cmp_key(self):
-               return -self.update_ts
+               return -self.update_ts.timestamp()
 
 
 @dataclass(eq = False)