Created
January 7, 2012 15:46
-
-
Save cwise/1575082 to your computer and use it in GitHub Desktop.
EngineYard resque-web
This file contains 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
require 'resque/server' | |
resque_constraint = lambda do |request| | |
request.env['warden'].authenticate? and request.env['warden'].user.admin? # or whatever manner your admin role can be determined | |
end | |
constraints resque_constraint do | |
mount Resque::Server.new, :at => "/resque" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment