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

Moved collector into subpackage with tests #22

Merged
merged 6 commits into from
Dec 19, 2016
Merged

Conversation

lox
Copy link
Contributor

@lox lox commented Dec 18, 2016

Turns out not having tests sucks, as does having loads of code in the main package. This remedies both of these things to a minimal extent.

@lox lox requested a review from toolmantim December 18, 2016 12:53
Copy link
Contributor

@toolmantim toolmantim left a comment

Choose a reason for hiding this comment

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

👏🏼

agents := v.([]bk.Agent)

for _, agent := range agents {
queue := "default"
Copy link
Contributor

Choose a reason for hiding this comment

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

An agent can have multiple queues. I have this bug too in the new queues API endpoint, so the numbers were a little off. We'll need to fix that here too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ORLY? That's interesting. I will keep this behaviour in currently and look to fix it in a subsequent PR.

@lox lox merged commit 38d1b98 into master Dec 19, 2016
@lox lox deleted the extract-collector-package branch December 19, 2016 02:36
func New(c *bk.Client, opts Opts) *Collector {
return &Collector{
Opts: opts,
buildService: c.Builds,
Copy link
Contributor

Choose a reason for hiding this comment

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

Just noticed this in my local copy (I'm doing a fork to add statsd support): should agentService be populated too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hrm, good point, now to figure out how it works at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just working on a PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

3 participants