R
RunPod2w ago
NGTK

How to cancel request

Here is my python code for running the request. ############# run_request = endpoint.run(input_payload) # 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.
1 Reply
nerdylive
nerdylive2w ago
if timeout happens it is going to fail state automatically and stop the job Delay queue? the processed job in queue again?
Want results from more Discord servers?
Add your server