God , Resque, Resque-schedule, is working,but buggy. Need to combine with LDAP and also implement XML calendar sync.
This commit is contained in:
1 parent
dbac219c18
commit
7af17f19ac
5 files changed
+27
-13
No files matched your search
@@ -1,13 +1,15 @@
|
||||
# require 'open-uri'
|
||||
# require 'nokogiri'
|
||||
module FetchTime
|
||||
@queue = :my_job_queue
|
||||
class FetchTime < Resque::Plugins::RestrictionJob
|
||||
restrict :per_300 => 10
|
||||
|
||||
@queue = :low
|
||||
|
||||
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
|
||||
# puts "Mail Sent"
|
||||
# true
|
||||
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
|
||||
Reference in new issue
Block a user