Created
October 27, 2010 23:54
-
-
Save brianjlandau/650274 to your computer and use it in GitHub Desktop.
A piece of Rails metal that allows you to run the Resque web server as part of the application.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # app/metal/resque_web.rb | |
| # Allow the metal piece to run in isolation | |
| require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails) | |
| require 'resque/server' | |
| Resque::Server.use Rack::Auth::Basic do |username, password| | |
| username == 'admin' && password == 'password' | |
| end | |
| ResqueWeb = Rack::URLMap.new("/resque" => Resque::Server.new) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment