lib/arborist/manager.rb in arborist-0.0.1.pre20160106113421 vs lib/arborist/manager.rb in arborist-0.0.1.pre20160128152542
- old
+ new
@@ -241,10 +241,11 @@
QUEUE_SIGS.each do |sig|
Signal.trap( sig, :DEFAULT )
end
end
+
### Handle any queued signals.
def process_signal_queue
# Look for any signals that arrived and handle them
while sig = Thread.main[:signal_queue].shift
self.handle_signal( sig )
@@ -286,11 +287,11 @@
self.log.warn "Hangup (%p)" % [ signo ]
self.restart
end
- ### Handle a USR1 signal. Writes a message to the log by default.
+ ### Handle a USR1 signal. Writes a message to the log.
def on_user1_signal( signo )
self.log.info "Checkpoint: User signal."
end
@@ -434,11 +435,11 @@
### Yield each node that is not down to the specified +block+, or return
### an Enumerator if no block is given.
def reachable_nodes( &block )
iter = self.enumerator_for( self.root ) do |node|
- !node.down?
+ !(node.down? || node.disabled?)
end
return iter.each( &block ) if block
return iter
end
@@ -489,10 +490,10 @@
### Propagate one or more +events+ to the specified +node+ and its ancestors in the tree,
### publishing them to matching subscriptions belonging to the nodes along the way.
def propagate_events( node, *events )
- self.log.debug "Propagating %d events to node %s" % [ events.length, node.identifier ]
+ self.log.info "Propagating %d events to node %s" % [ events.length, node.identifier ]
node.publish_events( *events )
if node.parent
parent = self.nodes[ node.parent ] or raise "couldn't find parent %p of node %p!" %
[ node.parent, node.identifier ]