I'm writing a piece of code that actually happens in a distributed system pipeline.
I need to paginate on search result and I can't retrieve all the results in one go (the results may be bigger than the batch_size that the components can use).
I've managed to use retrieve the old job
by
sid2='1654105815.20373'
old_job = service.job(sid2)
However sometime the jobs expires and I do have problems getting the result.
for result in results.JSONResultsReader(old_job.events(**{"count": total_size, "output_mode": "json","offset":800})):
if isinstance(result, results.Message):
print(result)
elif isinstance(result, dict😞
final_res.append(result)
always does not return anything (no values )are present.
Any advice?