Sha256: ac2044bab2c87aca835c2d8d2e11d9a50bf9eac1cb301010015ca1edf9db3c5d
Contents?: true
Size: 1.22 KB
Versions: 61
Compression:
Stored size: 1.22 KB
Contents
# frozen_string_literal: true module SidekiqUniqueJobs # # Class DeleteOrphans provides deletion of orphaned digests # # @note this is a much slower version of the lua script but does not crash redis # # @author Mikael Henriksson <mikael@mhenrixon.com> # module Orphans # # Observes the Orphan::Manager and provides information about each execution # # @author Mikael Henriksson <mikael@mhenrixon.com> # class Observer include SidekiqUniqueJobs::Logging # # Runs every time the {Manager} executes the TimerTask # used for logging information about the reaping # # @param [Time] time the time of the execution # @param [Object] result the result of the execution # @param [Exception] ex any error raised from the TimerTask # # @return [<type>] <description> # def update(time, result, ex) if result log_info("(#{time}) Execution successfully returned #{result}") elsif ex.is_a?(Concurrent::TimeoutError) log_warn("(#{time}) Execution timed out") else log_info("(#{time}) Cleanup failed with error #{ex.message}") log_error(ex) end end end end end
Version data entries
61 entries across 61 versions & 1 rubygems