R
Runpod6mo ago
Cemal

Terminate worker

Hi y'all, is there any way to terminate specific worker (serverless) via api or as additional control in handler return? I do not want to refresh the worker i just want to terminate at my special occasions.
6 Replies
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Cemal
CemalOP6mo ago
i just wanna delete that worker. sometimes some i see some workers has problems like they does not take the job or no cuda etc. idk maybe region or specific worker related, it dosent happen often but when it happens in one of my active workers my jobs keep failing. I am sending a notification myself when catch the error and delete manually. It would be so nice if that just fixed itself.
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
ozzie
ozzie6mo ago
I had a similar question recently which may be helpful to your question: https://discord.com/channels/912829806415085598/1351676903022530570 TL;DR is that there is a REST endpoint to delete an endpoint by id
nathaniel
nathaniel6mo ago
that's not the same as terminating a pod/worker by id. I am shortly adding an update to rest api which will let you pull the list of workers for your endpoint, and once you have the ids of those you can use the delete/terminate pod endpoint just as you can for normal pods will keep you updated on that first part, the second part can already be done if you know the worker's pod id by hitting DELETE https://rest.runpod.io/v1/pods/thePodId it sounds like you are polling through separate means for the error which will tell you the pod id, so yeah you can just use the rest api's delete pod endpoint https://rest.runpod.io/v1/docs#tag/pods/DELETE/pods/{podId} ok, the update I was talking about is now released, set includeWorkers=true for get and list endpoints to show current workers
Cemal
CemalOP5mo ago
Just saw this, awesome news, thanks!

Did you find this page helpful?