Skip to content

Instantly share code, notes, and snippets.

@hannahherbig
Created January 9, 2012 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hannahherbig/1582901 to your computer and use it in GitHub Desktop.
Save hannahherbig/1582901 to your computer and use it in GitHub Desktop.
require 'clockwork'
require 'stalker'
include Clockwork
handler do |job|
case job
when 'logs'
Stalker.enqueue 'logs',
path: "/home/supybot/logger/logs/ChannelLogger/malkier/#malkier"
when 'pisg'
Stalker.enqueue 'pisg', config: "/home/supybot/pisg/malkier.cfg"
Stalker.enqueue 'pisg', config: "/home/supybot/pisg/mcintec.cfg"
end
end
every(1.minute, 'logs')
every(1.hour, 'pisg')
source :rubygems
gem 'foreman'
gem 'stalker'
gem 'clockwork'
clock: clockwork clock.rb
worker: stalk worker.rb
require 'stalker'
include Stalker
job 'logs' do |args|
system "/usr/local/bin/logs2html", args['path']
end
job 'pisg' do |args|
system "pisg", "-co", args['config']
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment