From ea4a4e6ee03361e557a0bc81593671084f799af4 Mon Sep 17 00:00:00 2001 From: Matchu Date: Wed, 1 Dec 2010 19:28:16 -0500 Subject: [PATCH] thread safety breaks class autoloading in rake; move mall spider cron jobs to runner --- config/schedule.rb | 5 +++-- lib/tasks/items_spider_mall.rake | 11 ----------- 2 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 lib/tasks/items_spider_mall.rake diff --git a/config/schedule.rb b/config/schedule.rb index f55b4a63..c2bb4221 100644 --- a/config/schedule.rb +++ b/config/schedule.rb @@ -22,9 +22,10 @@ env :MAILTO, 'webmaster@openneo.net' every :day do - rake "items:spider_mall" + runner "Item.spider_mall!" end +ItemsLimit = 20 every :hour do - rake "items:spider_mall_assets" + runner "Item.spider_mall_assets! #{ItemsLimit}" end diff --git a/lib/tasks/items_spider_mall.rake b/lib/tasks/items_spider_mall.rake deleted file mode 100644 index e3b388f7..00000000 --- a/lib/tasks/items_spider_mall.rake +++ /dev/null @@ -1,11 +0,0 @@ -namespace :items do - desc "Spider NC Mall for wearable items, and store them for later asset spidering" - task :spider_mall => :environment do - Item.spider_mall! - end - - desc "Spider NC Mall for assets for NC Mall items we've already collected" - task :spider_mall_assets => :environment do - Item.spider_mall_assets!(ENV['LIMIT'] || 100) - end -end