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
def run | |
AMQP.logging = true | |
EM.run do | |
agent = Nanite::Agent.start(@config) | |
agent.register(Opscode::OhaiActor.new, 'state') | |
agent.register(Opscode::ChefActor.new, 'control') | |
agent.send :advertise_services | |
end | |
end |
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
def on_time_value | |
attendances.inject(0) do |sum, attendance| | |
sum += attendance.late? ? 0 : 5 | |
end | |
end |
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
# | |
# Cookbook Name:: delayed_job | |
# Recipe:: default | |
# | |
if ['solo', 'app', 'app_master'].include?(node[:instance_role]) | |
# be sure to replace "app_name" with the name of your application. | |
run_for_app("maloca") do |app_name, data| | |
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
error_page 405 =200 @405; | |
location @405 { | |
root /data/budlight/current/public/; | |
if (-f $request_filename) { | |
break; | |
} | |
} | |