Sha256: 521f52a15c0cb1af01bfbb143490cb3f7a9694164e52260b906419103de9954d

Contents?: true

Size: 376 Bytes

Versions: 1

Compression:

Stored size: 376 Bytes

Contents

require 'rake'
require 'multi_worker'

# No-op task in case it doesn't already exist
task :environment

namespace :multi_worker do
  desc "Start a new worker for #{MultiWorker.default_adapter}"
  task :work => :environment do
    rake_task = MultiWorker.adapter.rake_task rescue fail("No rake task available for #{MultiWorker.default_adapter}")
    rake_task.execute
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
multi_worker-0.1.0 lib/multi_worker/tasks.rb