lib/celluloid/supervision/container/instance.rb in celluloid-supervision-0.20.0 vs lib/celluloid/supervision/container/instance.rb in celluloid-supervision-0.20.1

- old
+ new

@@ -32,18 +32,18 @@ def start invoke_injection(:before_start) @actor = @type.send(@method, *@args, &@block) @registry.add(@name, @actor, @branch) if @name invoke_injection(:after_start) - rescue Celluloid::TimeoutError => ex - Internals::Logger.error("TimeoutError at start of supervised instance of #{@type}") + rescue Celluloid::TaskTimeout => ex + Internals::Logger.error("TaskTimeout at start of supervised instance of #{@type}") raise ex # TODO: Implement timeout/retry. # unless ( @retry += 1 ) <= INSTANCE_RETRY_LIMIT # raise ex # end - # Internals::Logger.warn("TimeoutError at start of supervised actor. Retrying in #{INSTANCE_RETRY_WAIT} seconds. ( Attempt #{@retry} of #{INSTANCE_RETRY_LIMIT} )") + # Internals::Logger.warn("TaskTimeout at start of supervised actor. Retrying in #{INSTANCE_RETRY_WAIT} seconds. ( Attempt #{@retry} of #{INSTANCE_RETRY_LIMIT} )") # sleep INSTANCE_RETRY_WAIT # retry rescue => ex Internals::Logger.error("Error ( #{ex.class} ) at start of supervised instance of #{@type}") raise ex @@ -80,11 +80,11 @@ Celluloid.instance_exec(@configuration[:as], name) do |actor, where| define_method(name) do Celluloid.actor_system[actor] end end - Celluloid::ActorSystem.instance_exec(@configuration[:as], name) do |actor, where| + Celluloid::Actor::System.instance_exec(@configuration[:as], name) do |actor, where| define_method(name) do Celluloid.actor_system[actor] end end end @@ -95,10 +95,10 @@ if @configuration[:accessors].is_a? Array @configuration[:accessors].each do |name| Celluloid.instance_eval do remove_method(name) rescue nil # avoid warnings in tests end - Celluloid::ActorSystem.instance_eval do + Celluloid::Actor::System.instance_eval do remove_method(name) rescue nil # avoid warnings in tests end end end end