aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2023-04-04 13:36:58 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2023-04-04 13:36:58 -0400
commit8d69c88d256470c8866ef6955c9c5373e9c8b86a (patch)
tree0ae74455256cc4151a7518cad391cf61465002a1
parent48d62f445304dc536846a5a8235ca71d4db66c90 (diff)
downloadbugspray-8d69c88d256470c8866ef6955c9c5373e9c8b86a.tar.gz
pi2bz: use a 10-minute overlap buffer for queries
When querying public-inbox, use a small overlap for dt: ranges, so we have a lower chance of missing messages. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--peebz/pi2bz.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/peebz/pi2bz.py b/peebz/pi2bz.py
index 240f64c..32f59cc 100644
--- a/peebz/pi2bz.py
+++ b/peebz/pi2bz.py
@@ -140,7 +140,9 @@ def update_component(product: str, component: str, dry_run: bool = False):
pass
qquery = urllib.parse.quote_plus(query)
query_url = url.rstrip('/') + f'/?x=m&q={qquery}'
- lastdt = now.strftime('%Y%m%d%H%M%S')
+ # Give a 10-minute overlap buffer
+ bufferago = now - datetime.timedelta(minutes=10)
+ lastdt = bufferago.strftime('%Y%m%d%H%M%S')
try:
msgs = get_query_results(query_url)
for msg in msgs: