now jobs is working

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-05-08 11:41:58 +08:00
1 parent 7339d1ee4a
commit 5b604037f8
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