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
#!/usr/bin/env ruby | |
# based on http://gist.github.com/29838 | |
# logging to syslog added | |
# added killing orphaned procs | |
# added culling applications to maintain some per application limits | |
# Find bloating passengers and kill them gracefully. Run from cron every so often. | |
# | |
require "rubygems" | |
require "logging" |
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
# sample skeleton for a ruby API based on the ideas from http://www.oceanstore.org/publications/papers/pdf/iptps03-api.pdf | |
class DistributeKeyBasedRouter | |
def initialize(deliver_to_class, deliver_class_method = :delivered) | |
@delivery_callback_class = deliver_to_class | |
@delivery_callback_method = deliver_class_method | |
end | |
NewerOlder