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

More efficient deregistering by task #104

Merged
merged 2 commits into from
Aug 23, 2016

Conversation

pbetkier
Copy link
Contributor

Deregistering by task used to load all nodes (service instances) and loop over them in search for marathon task tag. With this change it loads all services and only loads nodes of services containing the marathon task tag.

It also correctly handles the corner case when there are multiple nodes containing the same marathon task id tag – it deregisters all of them. Before it would deregister only the first occurrence.

@coveralls
Copy link

coveralls commented Aug 19, 2016

Coverage Status

Coverage decreased (-1.6%) to 84.204% when pulling 780fb4b on find_service_by_task_using_tags into 885200d on develop.

}
return allServices, nil
}

func dcAwareQueriesForAllDcs(agent *consulapi.Client) ([]*consulapi.QueryOptions, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@coveralls
Copy link

coveralls commented Aug 22, 2016

Coverage Status

Coverage decreased (-1.6%) to 84.204% when pulling 89af311 on find_service_by_task_using_tags into 885200d on develop.

@pbetkier pbetkier merged commit a95f16f into develop Aug 23, 2016
@janisz janisz deleted the find_service_by_task_using_tags branch February 17, 2017 18:52
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.

5 participants