Sha256: 0c937d4fd5999fda030f9712d628e7e17bb6a7f28592f0b8712b4f3e95e70401

Contents?: true

Size: 606 Bytes

Versions: 4

Compression:

Stored size: 606 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
begin
  require 'vegas'
rescue LoadError
  require 'rubygems'
  require 'vegas'
end  
require 'resque/server'


Vegas::Runner.new(Resque::Server, 'resque-web', {
  :before_run => lambda {|v|
    path = (ENV['RESQUECONFIG'] || v.args.first)
    load path.to_s.strip if path
  }
}) do |runner, opts, app|
  opts.on('-N NAMESPACE', "--namespace NAMESPACE", "set the Mongo database") {|namespace|
    runner.logger.info "Using Mongo database '#{namespace}'"
    Resque.mongo = Resque.mongo.conn.db(namespace)
  }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongo-resque-1.19.0.1 bin/resque-web
mongo-resque-1.19.0 bin/resque-web
mongo-resque-1.18.2 bin/resque-web
mongo-resque-1.17.1 bin/resque-web