brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alasdairhodge <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Fix: various 20141028
Date Wed, 29 Oct 2014 14:31:57 GMT
Github user alasdairhodge commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/280#discussion_r19541090
  
    --- Diff: software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNodeImpl.java
---
    @@ -251,10 +267,21 @@ public Void call(ConfigBag parameters) {
                     TaskTags.markInessential(shutdownTask);
                 }
                 DynamicTasks.queue(shutdownTask).asTask().getUnchecked();
    +            waitForShutdown(Duration.ONE_MINUTE);
    +            
                 DynamicTasks.queue(Effectors.invocation(entity(), STOP, ConfigBag.EMPTY)).asTask().getUnchecked();
                 Entities.destroy(entity);
                 return null;
             }
    +        
    +        private void waitForShutdown(Duration timeout) {
    +            Entity entity = entity();
    +            Repeater.create()
    +                .until(entity, EntityPredicates.attributeEqualTo(BrooklynNode.WEB_CONSOLE_ACCESSIBLE,
false))
    +                .backoffTo(Duration.FIVE_SECONDS)
    +                .limitTimeTo(timeout)
    +                .runRequiringTrue();
    +        }
    --- End diff --
    
    Duplicated method; move to static method in outer `BrooklynNode` class.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message