Sha256: 8f4662431e9640246a191581d23b2f1294e9dd10d744a98249ff3d4ba83f5ed3

Contents?: true

Size: 1017 Bytes

Versions: 2

Compression:

Stored size: 1017 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 Redis namespace") {|namespace|
    runner.logger.info "Using Redis namespace '#{namespace}'"
    Resque.redis.namespace = namespace
  }
  opts.on('-r redis-connection', "--redis redis-connection", "set the Redis connection string") {|redis_conf|
    runner.logger.info "Using Redis connection '#{redis_conf}'"
    Resque.redis = redis_conf
  }
  opts.on('-a url-prefix', "--append url-prefix", "set reverse_proxy friendly prefix to links") {|url_prefix|
    runner.logger.info "Using URL Prefix '#{url_prefix}'"
    Resque::Server.url_prefix = url_prefix
  }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque-2.2.0 bin/resque-web
resque-2.1.0 bin/resque-web