Skip to content

Instantly share code, notes, and snippets.

@abstractj
Created January 16, 2012 16:18
Show Gist options
  • Save abstractj/1621596 to your computer and use it in GitHub Desktop.
Save abstractj/1621596 to your computer and use it in GitHub Desktop.
integration_test
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
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