Sha256: 3a891000b93f28e60e36d62d1a36ba2c84ed5c8cb64232df2bf0b47a593d05f4
Contents?: true
Size: 772 Bytes
Versions: 9
Compression:
Stored size: 772 Bytes
Contents
namespace :insque do desc 'Starts insque listener and janitor' task :run => :environment do trap('TERM') { puts "SIGTERM"; exit 0 } Thread.abort_on_exception=true threads = [] threads << Thread.new() { Insque.listen } threads << Thread.new() { Insque.janitor } threads << Thread.new() { Insque.slow_listen } threads << Thread.new() { Insque.slow_janitor } threads.each {|t| t.join } end desc 'Starts insque listener' task :listener => :environment do trap('TERM') { puts "SIGTERM"; exit 0 } Thread.abort_on_exception=true Insque.listen end desc 'Starts insque janitor' task :janitor => :environment do trap('TERM') { puts "SIGTERM"; exit 0 } Thread.abort_on_exception=true Insque.janitor end end
Version data entries
9 entries across 9 versions & 1 rubygems