You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
261 B

  1. # frozen_string_literal: true
  2. class SidekiqErrorHandler
  3. def call(*)
  4. yield
  5. rescue Mastodon::HostValidationError
  6. # Do not retry
  7. ensure
  8. socket = Thread.current[:statsd_socket]
  9. socket&.close
  10. Thread.current[:statsd_socket] = nil
  11. end
  12. end