Commit fe6aba18 authored by Ioannis Tsafaras's avatar Ioannis Tsafaras
Browse files

Change related application model, when lambda instance is stopped or destroyed

parent 207565f0
......@@ -36,6 +36,14 @@ def set_lambda_instance_status(instance_uuid, status, failure_message=""):
lambda_instance.failure_message = failure_message
lambda_instance.save()
if (LambdaInstance.status_choices[int(status)][1] == 'STOPPING'):
LambdaInstanceApplicationConnection.objects.filter(
lambda_instance=lambda_instance).update(started=False)
if (LambdaInstance.status_choices[int(status)][1] == 'DESTROYING'):
LambdaInstanceApplicationConnection.objects.filter(
lambda_instance=lambda_instance).delete()
@shared_task
def insert_cluster_info(instance_uuid, specs, provisioner_response):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment