Skip to content
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

Implement limits group background task #488

Merged
4 commits merged into from Jun 21, 2017
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jun 20, 2017

Let me know if you want me to create a ticket for this. Also I'm open to comments about naming conventions.

@ghost ghost requested review from a user and donaldatball June 20, 2017 17:18
@ghost
Copy link
Author

ghost commented Jun 20, 2017

Let me know what you think about adding documentation for this feature. Should it go under System Configuration at the top somewhere? User Guides? Tips?

@coveralls
Copy link

coveralls commented Jun 20, 2017

Coverage Status

Coverage increased (+0.07%) to 85.576% when pulling dcd6152 on limits_groups_background_task into 6d07ad2 on master.

@@ -794,12 +794,14 @@ def get_limits_groups

# (see Cosmos::Limits#enable_group)
def enable_limits_group(group_name)
Logger.info("Enabling Limits Group: #{group_name.upcase}")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about putting the log message right in the API. I noticed we did that for enable_limits_group but not for a bunch of other things.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message should be in the API

# so it won't satisfy any of the other checks and enable the group
self.instance_variable_set(var_name, FUTURE_TIME)
@status = "Enabling group #{group.upcase} at #{Time.now}"
#Logger.info "Enabling group #{group.upcase}"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the logging in the API I need to implement it here

super(initial_delay)
@temp1_enable_code = Proc.new do
#Logger.info "Enabling group GROUND"
enable_limits_group('GROUND')
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the logging when I didn't see the message for this enable_limits_group. That's why I think it should be in the API.

@ghost
Copy link

ghost commented Jun 20, 2017

Also, yes please create a ticket for this.

end
end

def call
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use the @status variable to report status from the background task

@ghost
Copy link
Author

ghost commented Jun 20, 2017

closes #489

@coveralls
Copy link

coveralls commented Jun 20, 2017

Coverage Status

Coverage increased (+0.03%) to 85.535% when pulling 92e453c on limits_groups_background_task into 6d07ad2 on master.

# won't satisfy any of the other checks and disable the group
if !var || var == FUTURE_TIME
self.instance_variable_set(var_name, PAST_TIME)
@status = "Disabling group #{group.upcase} at #{Time.now}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Status should more be used for checking_limits/sleeping. Disabling group will show up in the messages.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only displays a single line so I thought it made sense to display the enable/disable actions

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, but the line will quickly become stale...

@ghost
Copy link

ghost commented Jun 20, 2017

I would like to see something that shows the task is alive on the CmdTlmServer Status tab. Maybe we need to add a run_count variable that counts every time the task runs?

@coveralls
Copy link

coveralls commented Jun 20, 2017

Coverage Status

Coverage increased (+0.06%) to 85.564% when pulling 17b163c on limits_groups_background_task into 6d07ad2 on master.

@ghost
Copy link

ghost commented Jun 21, 2017

Fix specs and then this looks good.

@coveralls
Copy link

coveralls commented Jun 21, 2017

Coverage Status

Coverage increased (+0.06%) to 85.565% when pulling ecee642 on limits_groups_background_task into 6d07ad2 on master.

@ghost
Copy link

ghost commented Jun 21, 2017

👍

@ghost ghost merged commit 10d6ec0 into master Jun 21, 2017
@ghost ghost deleted the limits_groups_background_task branch June 21, 2017 16:16
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants