starting Resque
This commit is contained in:
1 parent
ba4385e3fd
commit
7339d1ee4a
11 files changed
+114
-11
No files matched your search
@@ -0,0 +1,11 @@
|
||||
require 'open-uri'
|
||||
require 'nokogiri'
|
||||
module FetchTime
|
||||
@queue = :fetch_time
|
||||
|
||||
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
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
class CronMail < ActionMailer::Base
|
||||
default :from => "orbit_test@rulingcom.com"
|
||||
|
||||
def time_check(msg)
|
||||
#attachments["rails.png"] = File.read("#{Rails.root}/public/images/rails.png")
|
||||
mail(:to => "Matt <matt@rulingcom.com>", :subject => msg)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user