mirror of
https://github.com/endofunky/sidetiq.git
synced 2022-11-09 13:53:30 -05:00
23 lines
412 B
Ruby
23 lines
412 B
Ruby
module Sidetiq
|
|
module Actor
|
|
def self.included(base)
|
|
base.__send__(:include, Celluloid)
|
|
base.finalizer :sidetiq_finalizer
|
|
end
|
|
|
|
def initialize(*args, &block)
|
|
log_call "initialize"
|
|
super
|
|
end
|
|
|
|
private
|
|
|
|
def sidetiq_finalizer
|
|
log_call "shutting down ..."
|
|
end
|
|
|
|
def log_call(call)
|
|
info "#{self.class.name} id: #{object_id} #{call}"
|
|
end
|
|
end
|
|
end
|