From b5e671ba50d5d98823d50d8efb3a698102938345 Mon Sep 17 00:00:00 2001 From: Ben Galewsky Date: Mon, 22 Jul 2024 12:08:44 -0400 Subject: [PATCH] Backport of commit from Celery branch to fix off by one error --- src/servicex_did_finder_lib/communication.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/servicex_did_finder_lib/communication.py b/src/servicex_did_finder_lib/communication.py index b664cb4..ec93e9c 100644 --- a/src/servicex_did_finder_lib/communication.py +++ b/src/servicex_did_finder_lib/communication.py @@ -51,7 +51,10 @@ def send_on(self, count): if self._hold_till_end: self._hold_till_end = False files = sorted(self._file_cache, key=lambda x: x["paths"]) - self.send_bulk(files[:count]) + if count == -1: + self.send_bulk(files) + else: + self.send_bulk(files[:count]) def send_bulk(self, file_list: List[Dict[str, Any]]): "does a bulk put of files"