-
-
Save markomo/e516e3443d7039405853 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'roart' | |
class Ticket < Roart::Ticket | |
connection :server => 'http://nocrt.mosaic451.com', :user => 'svc_nocrt', :pass => 'pass' | |
end | |
# :first_in sets how long it takes before the job is first run. In this case, it is run immediately | |
SCHEDULER.every '1m', :first_in => 0 do |job| | |
my_tickets = Ticket.find(:all, :status => [:new, :open]) | |
send_event('un_rt', { current: my_tickets.size }) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment