Commit 6f2ce003 authored by Makis Tsantekidis's avatar Makis Tsantekidis
Browse files

Merge pull request #227 from ioantsaf/app-state-improvements

App state improvements
parents 7e65ce76 357d5b74
......@@ -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):
......
......@@ -19,7 +19,8 @@ var LambdaInstance = DS.Model.extend({
status_detail: DS.attr(), // status detail of lambda instance
status_failure_message: DS.attr(), // failure message
applications: DS.hasMany('lambda-app'), // deployed applications
running_app: DS.attr('boolean'), // is specific app started?
started_app: DS.attr('boolean'), // is specific app started?
running_app: DS.attr('boolean'), // is any app running on the lambda instance?
kafka_topics: DS.attr() // kafka topics of lambda instance
});
......
......@@ -199,7 +199,7 @@
{{li.name}}
{{/link-to}}
</td>
<td>{{li.status_details}}</td>
<td>{{li.status_detail}}</td>
<td>{{li.started_app}}</td>
<td>
<div class="table">
......
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