Sha256: 5381e9fbf44de4d6103c0ce3c728e157d931ce84980fd8074c348452d0bf43dd

Contents?: true

Size: 564 Bytes

Versions: 6

Compression:

Stored size: 564 Bytes

Contents

namespace :insque do
  desc 'Starts insque listener and janitor'
  task :run => :environment do
    trap('TERM') { puts "SIGTERM"; exit 0 }
    threads = []
    threads << Thread.new() { Insque.listen }
    threads << Thread.new() { Insque.janitor }
    threads.each {|t| t.join }
  end

  desc 'Starts insque listener'
  task :listener => :environment do
    trap('TERM') { puts "SIGTERM"; exit 0 }
    Insque.listen
  end

  desc 'Starts insque janitor'
  task :janitor => :environment do
    trap('TERM') { puts "SIGTERM"; exit 0 }
    Insque.janitor
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
insque-0.4.3 lib/tasks/insque.rake
insque-0.4.2 lib/tasks/insque.rake
insque-0.4.1 lib/tasks/insque.rake
insque-0.4.0 lib/tasks/insque.rake
insque-0.3.5 lib/tasks/insque.rake
insque-0.3.4 lib/tasks/insque.rake