My use case for this endpoint is waiting for a machine to start and if it didn’t start try in another region
The problem is that the machine could have already finished its process and already be stopped when i call this endpoint
If instead this endpoint returned the current machine state i could check if it is already
stopped and do not try to create another machine
PS: Does creating a machine always success or not in case you are at full capacity?
/wait?state=xxx will only return (without a timeout) when the machine state is
Couldn’t you achieve what you want by also checking the state of your machine?
Sure, i can fetch the machine and check if it already stopped.
If i use
auto_destroy, will the GET machine endpoint return the machine data if the machine already got destroyed? For how much time do you keep destroyed machines in your database?
Since you still can see the destroyed machines (even long after they’ve been destroyed) in the “Machines” tab or your app’s dashboard, I’d say that would work.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.