Skip to content

Commit 9175828

Browse files
committed
increased time to cancel
1 parent 4787358 commit 9175828

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sdks/python/apache_beam/examples/inference/pytorch_sentiment.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,12 @@ def run(
316316
method=method))
317317

318318
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.
319322
result.wait_until_finish(duration=1800000) # 30 min
320323
result.cancel()
324+
result.wait_until_finish(duration=600000) # up to 10 min to settle cancel
321325

322326
cleanup_pubsub_resources(
323327
project=known_args.project,

0 commit comments

Comments
 (0)