aws/aws-flow-ruby — pull request #34 by chunkerchunker (2014-01-22 19:56:31+00:00)
Title: Allow ActivityWorker to shutdown cleanly

ActivityWorker doesn't shutdown cleanly.

It registers a @shutdown_first_time_function in initialize that does a Kernel.exit on sigint/term. But the exit exception is caught by the poller (task_poller.rb line 182), so the ActivityWorker continues the task polling loop.

This change just ends the loop if the worker is shutting down.