Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Bug 1125850 - Optimize sitemap celery task #3290

Merged
merged 1 commit into from Jul 1, 2015
Merged

Bug 1125850 - Optimize sitemap celery task #3290

merged 1 commit into from Jul 1, 2015

Conversation

jezdez
Copy link
Contributor

@jezdez jezdez commented Jun 29, 2015

This does a bunch of things:

  • limit the documents we want to write sitemap files for (by using an already existing model manager)
  • stop fetching the html blob from the database
  • split the sitemap building into tasks per locale to distribute load to all celery nodes
  • use a chord to write the sitemap index after building all individual sitemap files
  • write sitemap files that are above the 50k items per sitemap limit instead of just the first one

@jezdez jezdez force-pushed the bug1125850-6 branch 2 times, most recently from 23f42c0 to cefa731 Compare June 30, 2015 10:15

del queryset # Force the gc to cleanup
for result in results:
# result can be empty of no documents were found
Copy link
Contributor

Choose a reason for hiding this comment

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

s/of/if/

@robhudson
Copy link
Contributor

Looks great. r+wc

This does a bunch of things:

- limit the documents we want to write sitemap files for (by using an already existing model manager)
- stop fetching the html blob from the database
- split the sitemap building into tasks per locale to distribute load to all celery nodes
- use a chord to write the sitemap index after building all individual sitemap files
- write sitemap files that are above the 50k items per sitemap limit instead of just the first one
@jezdez jezdez assigned jezdez and unassigned robhudson Jul 1, 2015
jezdez added a commit that referenced this pull request Jul 1, 2015
Bug 1125850 - Optimize sitemap celery task
@jezdez jezdez merged commit e537f59 into master Jul 1, 2015
@jezdez jezdez deleted the bug1125850-6 branch July 1, 2015 19:16
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.

None yet

2 participants