predict: fix batch error reporting

This commit is contained in:
Koushik Dutta
2024-06-10 16:02:50 -07:00
parent 301a5b6685
commit d8d2fd25cd

View File

@@ -145,8 +145,8 @@ class PredictPlugin(DetectPlugin):
for i, result in enumerate(results):
batch[i][1].set_result(result)
except Exception as e:
for i, result in enumerate(results):
batch[i][1].set_exception(e)
for input in batch:
input[1].set_exception(e)
async def flush_batch(self):
self.batch_flush = None