Sha256: baec9e77681fca7c2f6c39f5d9e685a3184fdfa7e50ea28b3ea6e4b57b08b1c0

Contents?: true

Size: 1.02 KB

Versions: 2

Compression:

Stored size: 1.02 KB

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_admin/server'


Vegas::Runner.new(ResqueAdmin::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}'"
    ResqueAdmin.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}'"
    ResqueAdmin.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}'"
    ResqueAdmin::Server.url_prefix = url_prefix
  }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque_admin-1.0.5 bin/resque-web
resque_admin-0.2.0 bin/resque-admin-web