I don't think you need to wait for the delete to succeed before calling continue.  No need for the onsuccess function. You can just call delete and assume it works.