Some Machines take several minutes after I call destroy vm to receive the signal and actually terminate. Is this expected? Should I be calling the wait API to wait for the machine to actually be destroyed? This is causing issues during my deployments which is resulting in different boxes having multiple deployed versions of the code.
My app name: 01gvfwwmq3dfyzsfdyc7hy1ker
Machine ID: 148e42ef7d5189
Ah, ok, yes this explains it. Destroying the app goes through our central API which does uses async jobs to process the destroying of resources associated with the App. If you destroy the machines first, the request goes through much quicker.
Thanks! I updated my service logic. When I call destroy on a machine and the request returns successfully, does that mean the resource has been destroyed successfully? Or do I need to call wait and block until the state actually changes, similar to what I need to do when i create a new machine?