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

Fixes bug 1225447 - Split query to graphics_devices into smaller chun… #3102

Merged

Conversation

adngdb
Copy link
Contributor

@adngdb adngdb commented Nov 19, 2015

…ks to avoid hitting URL size limit.

@peterbe r?

@adngdb
Copy link
Contributor Author

adngdb commented Nov 19, 2015

@peterbe So I had to do as you proposed and split the query, because the graphics_devices service already has a POST endpoint, so I couldn't just write post = get.


adapters = [
{
'term': '0x{0:0>4}'.format(i),
Copy link
Contributor

Choose a reason for hiding this comment

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

what does this fancy thing do? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It makes sure there are always 4 chars, and fills the string with zeros to the left if i is smaller than 4 chars. Do I really have to put a comment to explain that? It's part of the standard python library, not some deep logic that we built.

Copy link
Contributor

Choose a reason for hiding this comment

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

No, I knew it was a format trick. I just didn't recognize it "by heart".
We only comment on business logic.

…ks to avoid hitting URL size limit. r=peterbe
@adngdb adngdb force-pushed the 1225447-graphics-summary-split-query branch from 256962f to 5581aa1 Compare November 19, 2015 16:41
@adngdb adngdb merged commit 5581aa1 into mozilla-services:master Nov 19, 2015
@adngdb adngdb deleted the 1225447-graphics-summary-split-query branch November 19, 2015 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants