Class: Writefully::Workers::BaseWorker
- Inherits:
-
Object
- Object
- Writefully::Workers::BaseWorker
- Includes:
- Celluloid
- Defined in:
- lib/writefully/workers/base_worker.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
8 9 10 |
# File 'lib/writefully/workers/base_worker.rb', line 8 def @message end |
Instance Method Details
#actor_died(actor, reason) ⇒ Object
19 20 21 22 |
# File 'lib/writefully/workers/base_worker.rb', line 19 def actor_died(actor, reason) Writefully.logger.error "#{reason.class} #{reason.} #{reason.backtrace}" if reason on_death(actor, reason) if self.respond_to?(:on_death) end |
#close_db_connection! ⇒ Object
15 16 17 |
# File 'lib/writefully/workers/base_worker.rb', line 15 def close_db_connection! ::ActiveRecord::Base.clear_active_connections! if defined?(::ActiveRecord) end |
#perform(message) ⇒ Object
10 11 12 13 |
# File 'lib/writefully/workers/base_worker.rb', line 10 def perform() @message = self.__send__ [:task] end |