lib/hanami/events/cloud_pubsub/runner.rb
# Will be called on SIGINT, TERM
#
# Responsible for gracefully shutting down the runner. This may involve
# waiting for messages to finish processing, etc. If this method succesfully
# runs, there should be no potential for undefined behavior.
Will be called on SIGINT, TERM
Responsible for gracefully shutting down the runner. This may involve
waiting for messages to finish processing, etc. If this method succesfully
runs, there should be no potential for undefined behavior.
Will be called on SIGINT TERM Responsible for gracefully shutting down the runner . This may involve waiting for messages to finish processing etc . If this method succesfully runs there should be no potential for undefined behavior .
def gracefully_shutdown
          stop
          logger.info "Gracefully shutting down CloudPubsub runner: #{self}"
          adapter.listeners.each { |l| l.wait(@sleep_time) }
          adapter.flush_messages
          handle_on_shutdown
          self
        end
def gracefully_shutdown stop logger . info "Gracefully shutting down CloudPubsub runner: #{self}" adapter . listeners . each { | l | l . wait ( @sleep_time ) } adapter . flush_messages handle_on_shutdown self end
Will be called on SIGINT, TERM
Responsible for gracefully shutting down the runner.
Will be called on SIGINT TERM Responsible for gracefully shutting down the runner .