Created
August 1, 2015 03:17
-
-
Save adam-phillipps/c184389449313178a567 to your computer and use it in GitHub Desktop.
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
@poller.poll(visibility_timeout: @initial_timeout) do |msg| | |
unless msg.receipt_handle.nul? | |
@message_receipt_handle = msg.receipt_handle | |
run_job # run_job deletes message after it's finished | |
continue_to_poll if viable? | |
end | |
@ec2_client.stop_instances({[instance_id: @instance_id]}) if should_stop? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment