Created
March 29, 2012 19:16
-
-
Save jkutner/2242363 to your computer and use it in GitHub Desktop.
TorqueBox Clustering
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
$ torquebox run --clustered | |
$ JBOSS_OPTS="-Djboss.node.name=node2 \ | |
-Djboss.server.data.dir=/tmp/node2 \ | |
-Djboss.socket.binding.port-offset=100" \ | |
torquebox run --clustered | |
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
$ gem install torquebox-server -v 2.0.0.cr1 |
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
class MyJob | |
def run | |
puts "I'm a cod fish" | |
end | |
end |
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
TorqueBox.configure do | |
job MyJob do | |
cron "0/1 * * * * ?" | |
singleton true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment