Sha256: 257d245c8ba61db426b0b810ed11e90f6dcd804f41bfafe05726724d2cf2f73e

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

namespace :sad do
	desc "start sad with args - COUNT=4 QUEUE=sosad DIR=./tmp/pids"
	task :start do
		opts = {
			:dir => ENV['DIR'],
			:multiple => true,
			:log_output => true,
			:backtrace  => true,
			:ARGV => ['start']
		}
		Sad::Runner.exec(opts)
	end

	desc "stop sad with args - COUNT=4 QUEUE=sosad DIR=./tmp/pids"
	task :stop do
		opts = {
			:dir => ENV['DIR'],
			:multiple => true,
			:log_output => true,
			:backtrace  => true,
			:ARGV => ['stop']
		}
		Sad::Runner.exec(opts)
	end

	desc "restart sad with args - COUNT=4 QUEUE=sosad DIR=./tmp/pids"
	task :restart do
		opts = {
			:dir => ENV['DIR'],
			:multiple => true,
			:log_output => true,
			:backtrace  => true,
			:ARGV => ['restart']
		}
		Sad::Runner.exec(opts)
	end

    desc "ontop sad with args - QUEUE=sosad DIR=./tmp/pids"
    task :ontop do
		ENV['COUNT'] = 1
        opts = {
                :dir => ENV['DIR'],
                :multiple => true,
                :log_output => true,
                :backtrace  => true,
                :ontop => true,
                :ARGV => ['start']
        }
        Sad::Runner.exec(opts)
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sad-1.5.9 lib/sad/tasks.rb
sad-1.5.8 lib/sad/tasks.rb
sad-1.5.7 lib/sad/tasks.rb