now jobs is working

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-05-08 20:21:28 +08:00
1 parent c28d7d59b6
commit 69f2f6a716
6 files changed
+29 -25

No files matched your search

+8 -6
View File
@@ -1,11 +1,13 @@
require 'open-uri'
require 'nokogiri'
# require 'open-uri'
# require 'nokogiri'
module FetchTime
@queue = :fetch_time
@queue = :my_job_queue
def self.perform()
sleep 10
doc = Nokogiri::HTML(open('http://www.timeanddate.com/worldclock/city.html?n=241'))
CronMail.time_check(doc.at('#ct').children.first.text).deliver
# sleep 10
# doc = Nokogiri::HTML(open('http://www.timeanddate.com/worldclock/city.html?n=241'))
# CronMail.time_check(doc.at('#ct').children.first.text).deliver
# puts "Mail Sent"
# true
end
end