lib/adhearsion/call.rb in adhearsion-3.0.0.beta1 vs lib/adhearsion/call.rb in adhearsion-3.0.0.beta2
- old
+ new
@@ -21,10 +21,16 @@
def method_missing(meth, *args, &block)
super(meth, *args, &block)
rescue ::Celluloid::DeadActorError
raise ExpiredError, "This call is expired and is no longer accessible. See http://adhearsion.com/docs/calls for further details."
end
+
+ def active?
+ alive? && super
+ rescue ExpiredError
+ false
+ end
end
include Celluloid
include HasGuardedHandlers
@@ -533,10 +539,10 @@
# @return [Celluloid::ThreadHandle]
#
def execute_controller(controller = nil, completion_callback = nil, &block)
raise ArgumentError, "Cannot supply a controller and a block at the same time" if controller && block_given?
controller ||= CallController.new current_actor, &block
- logger.info "Executing controller #{controller.inspect}"
+ logger.info "Executing controller #{controller.class}"
controller.bg_exec completion_callback
end
# @private
def register_controller(controller)