We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4787358 commit 9175828Copy full SHA for 9175828
1 file changed
sdks/python/apache_beam/examples/inference/pytorch_sentiment.py
@@ -316,8 +316,12 @@ def run(
316
method=method))
317
318
result = pipeline.run()
319
+ # For streaming benchmarks, run for a bounded duration, then cancel and wait
320
+ # until terminal state so benchmark harness does not observe a lingering
321
+ # CANCELLING job.
322
result.wait_until_finish(duration=1800000) # 30 min
323
result.cancel()
324
+ result.wait_until_finish(duration=600000) # up to 10 min to settle cancel
325
326
cleanup_pubsub_resources(
327
project=known_args.project,
0 commit comments