Sha256: 6f3d9c7f8a86d2b65e498146dbc48c152cf79d7c7d15d50d861df95346c63102

Contents?: true

Size: 1.36 KB

Versions: 5

Compression:

Stored size: 1.36 KB

Contents

namespace :sad do
	task :setup do
		if defined?(Rails)
			Rake::Task["environment"].invoke
		end
	end

	desc "start sad with args - COUNT=4 QUEUE=sosad DIR=./tmp/pids"
	task :start => [ :setup ] do
		ENV['COUNT'] = '1' unless ENV['COUNT']
		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 => [ :setup ] do
		ENV['COUNT'] = '1' unless ENV['COUNT']
		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 => [ :setup ] do
		ENV['COUNT'] = '1' unless ENV['COUNT']
		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 => [ :setup ] 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

5 entries across 5 versions & 1 rubygems

Version Path
sad-1.5.14 lib/sad/tasks.rb
sad-1.5.13 lib/sad/tasks.rb
sad-1.5.12 lib/sad/tasks.rb
sad-1.5.11 lib/sad/tasks.rb
sad-1.5.10 lib/sad/tasks.rb