-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Healthcheck notification won't display if task state is TASK_FAILED #913
Conversation
@@ -14,6 +14,7 @@ class taskHealthcheckNotificationSubview extends View | |||
|
|||
render: => | |||
return if not @model.synced | |||
return if _.last(@model.attributes.taskUpdates).taskState is "TASK_FAILED" # This is unfortunately the only place last state is stored. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are pulling the task state in the same way in other places as well, no need for the comment here. Alternatively, if you want it cleaner here, you could add a line in parse
on the model for the task and set an attribute called currentState
using the code above. Then we have it for reference later on on each task model that we look at
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
👍 |
@@ -14,6 +14,7 @@ class taskHealthcheckNotificationSubview extends View | |||
|
|||
render: => | |||
return if not @model.synced | |||
return if @model.attributes.lastKnownState is "TASK_FAILED" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Single quotes for this?
Don't display healthcheck message for tasks in state TASK_LOST or TASK_FINISHED
Healthcheck notification won't display if task state is TASK_FAILED
The notification that the task failed due to no passing healthchecks was being displayed even for tasks that failed on their own for other reasons.
This fixes that.