Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Return queue length with metadata #128

Merged
merged 3 commits into from
Dec 15, 2017

Conversation

leafnode
Copy link
Contributor

Added feature from the queue API: returning queue length with the metadata.

@arafato
Copy link
Owner

arafato commented Dec 14, 2017

This is great @leafnode , thanks a lot! Will merge tomorrow when I'm back in coding mode ;-)

response = new AzuriteQueueResponse();
response.addMetaProps(metaProps);
response.addMetaProps(metaProps, queueLength);
Copy link
Owner

Choose a reason for hiding this comment

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

@leafnode can you please use response.addHttpProperty('x-ms-approximate-messages-count', queueLength);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! Actually, adding more parameters to the signature looked bad, but I wanted to keep this in one place and didn't have much time for deeper refactoring. But if adding it in another line is fine - I'm good with it.

Object.keys(metaProps).forEach((key) => {
this.addHttpProperty(`x-ms-meta-${key}`, metaProps[key]);
});
this.addHttpProperty(`x-ms-approximate-messages-count`, queueLength);
Copy link
Owner

Choose a reason for hiding this comment

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

@leafnode and remove this line and switch back to original signature? Thanks!

@arafato arafato merged commit c08caca into arafato:master Dec 15, 2017
@leafnode leafnode deleted the return-queue-length branch December 15, 2017 12:09
@arafato
Copy link
Owner

arafato commented Dec 15, 2017

Great, thanks a lot @leafnode ! Just merged and will be publishing as v1.8.1 soon.

arafato added a commit that referenced this pull request Dec 15, 2017
@laMoradaPostrera
Copy link

Cobos Franco, inc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants