Skip to content

Commit

Permalink
Push intermediate results
Browse files Browse the repository at this point in the history
  • Loading branch information
ponyisi committed Nov 13, 2024
1 parent 98de428 commit cbe1d88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/servicex_did_finder_lib/did_finder_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cbe1d88

Please sign in to comment.