X-Git-Url: http://www.average.org/gitweb/?a=blobdiff_plain;f=loctrkd%2Fevstore.py;h=da34cb9fdd1bfca083a44f03a9b4ecc738810fab;hb=15537c8be40f3ba25c5a51af75d9bed53a8a215d;hp=07b6dc4b760b7de08349611e844168ab0e80470a;hpb=b0bfb1a7b499ca18bf707858b0650e04acec9881;p=loctrkd.git diff --git a/loctrkd/evstore.py b/loctrkd/evstore.py index 07b6dc4..da34cb9 100644 --- a/loctrkd/evstore.py +++ b/loctrkd/evstore.py @@ -56,7 +56,7 @@ def stow(**kwargs: Any) -> None: def fetch( imei: str, matchlist: List[Tuple[bool, str]], backlog: int -) -> List[Tuple[bool, float, bytes]]: +) -> List[Tuple[bool, float, str, bytes]]: # matchlist is a list of tuples (is_incoming, proto) # returns a list of tuples (is_incoming, timestamp, packet) assert DB is not None @@ -65,7 +65,7 @@ def fetch( ) cur = DB.cursor() cur.execute( - f"""select is_incoming, tstamp, packet from events + f"""select is_incoming, tstamp, proto, packet from events where ({selector}) and imei = ? order by tstamp desc limit ?""", tuple(item for sublist in matchlist for item in sublist)