Merge master

This commit is contained in:
Kyle Drake 2014-12-23 09:23:30 -08:00
commit 3354df5bbe
3 changed files with 11 additions and 16 deletions

View file

@ -164,16 +164,11 @@ task :cleantags => [:environment] do
Tag.where(name: 'porn').first.update is_nsfw: true Tag.where(name: 'porn').first.update is_nsfw: true
end end
require 'thread/pool'
desc 'update screenshots' desc 'update screenshots'
task :update_screenshots => [:environment] do task :update_screenshots => [:environment] do
pool = Thread.pool 10
Site.select(:username).where(site_changed: true, is_banned: false, is_crashing: false).filter(~{updated_at: nil}).order(:updated_at.desc).all.each do |site| Site.select(:username).where(site_changed: true, is_banned: false, is_crashing: false).filter(~{updated_at: nil}).order(:updated_at.desc).all.each do |site|
pool.process { ScreenshotWorker.new.perform site.username, 'index.html' } ScreenshotWorker.perform_async site.username, 'index.html'
end end
sleep
end end
desc 'prime_space_used' desc 'prime_space_used'

View file

@ -31,8 +31,8 @@
<h2 class="eps"><%= current_site.title %></h2> <h2 class="eps"><%= current_site.title %></h2>
<p class="site-url" style="margin-top: -9px;"><a href="//<%= current_site.host %>" target="_blank"><%= current_site.host %></a></p> <p class="site-url" style="margin-top: -9px;"><a href="//<%= current_site.host %>" target="_blank"><%= current_site.host %></a></p>
<ul> <ul>
<% if current_site.updated_at %> <% if current_site.site_updated_at %>
<li>Last updated <%= current_site.updated_at.ago.downcase %></li> <li>Last updated <%= current_site.site_updated_at.ago.downcase %></li>
<% end %> <% end %>
<li>Using <strong><%= current_site.space_percentage_used %>% (<%= current_site.total_space_used.to_space_pretty %>) of your <%= current_site.maximum_space.to_space_pretty %></strong>. <li>Using <strong><%= current_site.space_percentage_used %>% (<%= current_site.total_space_used.to_space_pretty %>) of your <%= current_site.maximum_space.to_space_pretty %></strong>.
<br> <br>

View file

@ -212,32 +212,32 @@
<ul class="website-Gallery hp-Gallery"> <ul class="website-Gallery hp-Gallery">
<li> <li>
<a href="http://dragonquest.neocities.org/" title="The Quest of Dragons" target="_blank"> <a href="http://dragonquest.neocities.org/" title="The Quest of Dragons" target="_blank">
<img src="//neocities.org/site_screenshots/dragonquest/index.html.270x162.jpg" class="neo-SS" alt="Thumbnail of The Quest of Dragons" /> <img src="//neocities.org/site_screenshots/dragonquest/index.html.210x158.jpg" class="neo-SS" alt="Thumbnail of The Quest of Dragons" />
</a> </a>
</li> </li>
<li> <li>
<a href="http://codeventurer.neocities.org/" title="codeventurer" target="_blank"> <a href="http://codeventurer.neocities.org/" title="codeventurer" target="_blank">
<img src="http://neocities.org/site_screenshots/codeventurer/index.html.270x162.jpg" class="neo-SS" alt="Thumbnail of codeventurer" /> <img src="http://neocities.org/site_screenshots/codeventurer/index.html.210x158.jpg" class="neo-SS" alt="Thumbnail of codeventurer" />
</a> </a>
</li> </li>
<li> <li>
<a href="http://clouds.neocities.org/" title="Cloud Quotes" target="_blank"> <a href="http://clouds.neocities.org/" title="Cloud Quotes" target="_blank">
<img src="//neocities.org/site_screenshots/clouds/index.html.270x162.jpg" class="neo-SS" alt="Thumbnail of Cloud Quotes" /> <img src="//neocities.org/site_screenshots/clouds/index.html.210x158.jpg" class="neo-SS" alt="Thumbnail of Cloud Quotes" />
</a> </a>
</li> </li>
<li> <li>
<a href="http://manatee.neocities.org/" title="Title of Website" target="_blank"> <a href="http://manatee.neocities.org/" title="Title of Website" target="_blank">
<img src="//neocities.org/site_screenshots/manatee/index.html.270x162.jpg" class="neo-SS" alt="Thumbnail of TITLE OF WEBSITE" /> <img src="//neocities.org/site_screenshots/manatee/index.html.210x158.jpg" class="neo-SS" alt="Thumbnail of TITLE OF WEBSITE" />
</a> </a>
</li> </li>
<li> <li>
<a href="http://suppilulemur.neocities.org/" title="Sokoban" target="_blank"> <a href="http://suppilulemur.neocities.org/" title="Sokoban" target="_blank">
<img src="//neocities.org/site_screenshots/suppilulemur/index.html.270x162.jpg" class="neo-SS" alt="Thumbnail of Sokoban" /> <img src="//neocities.org/site_screenshots/suppilulemur/index.html.210x158.jpg" class="neo-SS" alt="Thumbnail of Sokoban" />
</a> </a>
</li> </li>
<li> <li>
<a href="http://drawinglair.neocities.org/" title="Tomasz Zawadzki" target="_blank"> <a href="http://drawinglair.neocities.org/" title="Tomasz Zawadzki" target="_blank">
<img src="//neocities.org/site_screenshots/drawinglair/index.html.270x162.jpg" class="neo-SS" alt="Thumbnail of Tomasz Zawadzki" /> <img src="//neocities.org/site_screenshots/drawinglair/index.html.210x158.jpg" class="neo-SS" alt="Thumbnail of Tomasz Zawadzki" />
</a> </a>
</li> </li>
</ul> </ul>