def delete_scratch_org(org_instance_id):
reset_database_connection()
from metaci.cumulusci.models import ScratchOrgInstance
try:
org = ScratchOrgInstance.objects.get(id=org_instance_id)
except ScratchOrgInstance.DoesNotExist:
return 'Failed: could not find ScratchOrgInstance with id {}'.format(
org_instance_id)
org.delete_org()
if org.deleted:
return 'Deleted org instance #{}'.format(org.id)
else:
return 'Failed to delete org instance #{}'.format(org.id)
评论列表
文章目录