Refactor sitemap function to use async for for easier reasoning. Factor out the user fetch as this was causing a huge blocking operation and eating a massive amount of memory.

This commit is contained in:
terakilobyte
2015-04-24 13:13:50 -04:00
parent 2ba0e91d49
commit a8689fec4a
2 changed files with 202 additions and 135 deletions

View File

@@ -32,14 +32,6 @@ urlset(xmlns="http://www.sitemaps.org/schemas/sitemap/0.9")
changefreq daily
priority= 0.8
//- Users
each user in users
url
loc #{appUrl}/#{user.profile.username}
lastmod= now
changefreq daily
priority= 0.9
//- Products
each bonfire in bonfires
url