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

refactor: use List Node Allocations endpoint #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

biraj21
Copy link

@biraj21 biraj21 commented Sep 15, 2024

Use List Node Allocations to directly get allocations by node ID rather than getting AllocationListStub and then querying for individual Allocation. Also eliminates the if block to check whether the current allocation is running on this node or not.

Docs: https://developer.hashicorp.com/nomad/api-docs/nodes#list-node-allocations

Use List Node Allocations to directly get allocations by node ID rather than getting AllocationListStub and then querying for individual Allocation. Also eliminates the if block to check whether the current allocation is running on this node or not. 

Docs: https://developer.hashicorp.com/nomad/api-docs/nodes#list-node-allocations
@biraj21 biraj21 changed the title per: use List Node Allocations endpoint perf: use List Node Allocations endpoint Sep 15, 2024
@biraj21 biraj21 changed the title perf: use List Node Allocations endpoint refactor: use List Node Allocations endpoint Sep 15, 2024
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.

1 participant