diff --git a/src/servicex_did_finder_lib/did_finder_app.py b/src/servicex_did_finder_lib/did_finder_app.py index 87407e5..b167f4e 100644 --- a/src/servicex_did_finder_lib/did_finder_app.py +++ b/src/servicex_did_finder_lib/did_finder_app.py @@ -97,8 +97,11 @@ def do_lookup(self, did: str, dataset_id: int, endpoint: str, user_did_finder: U try: for file_info in user_did_finder(did_info.did, info, self.app.did_finder_args): acc.add(file_info) + if did_info.file_count == -1: + acc.send_on(-1) # if looking up full dataset, can send partial results - acc.send_on(did_info.file_count) + if did_info.file_count > 0: # otherwise wait until all files arrive, then limit results + acc.send_on(did_info.file_count) except Exception: # noinspection PyTypeChecker self.logger.error(