# Initial check without blocking, useful for quick tasks status = run_request.status() print(f"Initial job status: {status}")
if status != "COMPLETED": # Polling with timeout for long-running tasks return run_request.output(timeout=80) else: return run_request.output()
#############
I just want to know how to cancel the request if the timeout happens using run_request.cancel()
Currently the request stops execution and throws an error message if timeout exceeds but sometimes the request still exists in the delay queue resulting in increased costs.
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
R
Runpod
We're a community of enthusiasts, engineers, and enterprises, all sharing insights on AI, Machine Learning and GPUs!