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

A couple cleanups from running the gardener locally #182

Merged
merged 2 commits into from
Apr 6, 2017

Conversation

iandees
Copy link
Member

@iandees iandees commented Apr 6, 2017

A couple cleanups from #180.

  • Have to include tilesize in the redshift group by query
  • Filter out null tile coords that might sneak in to the immortal tiles section
  • The redis client expects srem args to be a star-arg, not a list

- Have to include tilesize in the redshift group by query
- Filter out null tile coords that might sneak in to the immortal tiles section
- The redis client expects srem args to be a star-arg, not a list
@@ -18,7 +18,7 @@ def intersect(self, coords, tiles_of_interest=None):
yield coord

def remove_tiles_of_interest(self, coord_ints):
return self.redis_client.srem(self.cache_set_key, coord_ints)
return self.redis_client.srem(self.cache_set_key, *coord_ints)
Copy link
Member

Choose a reason for hiding this comment

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

Nice catch! ⚡

This will turn into a single call to redis, so we probably shouldn't call this with millions of integers. (Not sure if we are or aren't, just caught my eye).

Copy link
Member Author

Choose a reason for hiding this comment

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

It's currently getting called in groups of 1000. It's probably a good thing to document, though.

Copy link
Member

Choose a reason for hiding this comment

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

👍 I was just lazy and didn't check :)

@iandees iandees merged commit 9d1e0c5 into master Apr 6, 2017
@iandees iandees deleted the iandees/cleanup-gardener branch April 6, 2017 18:16
@iandees iandees removed the in review label Apr 6, 2017
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.

2 participants