Created
January 16, 2012 16:18
-
-
Save abstractj/1621596 to your computer and use it in GitHub Desktop.
integration_test
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
class LongRunningJob | |
include TorqueBox::Injectors | |
def initialize(opts) | |
@options = opts | |
@polish = inject( Java::pl.softwaremine.ThingThree ) | |
@response_queue = inject( '/queue/response' ) | |
@init_params_queue = inject( '/queue/init_params' ) | |
@init_params_queue.publish( @options ) | |
end | |
def run() | |
sleep(5000) | |
$stderr.puts "Job executing! queue is #{@response_queue} and polish is #{@polish}" | |
@response_queue.publish( 'done' ) if @polish | |
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
jobs: | |
job.four: | |
job: LongRunningJob | |
description: My long running job has timeout | |
cron: 01 01 01 15 * ? | |
timeout: 500 s | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment