brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Corbett <sam.corb...@cloudsoftcorp.com>
Subject New policy for auto-stopping applications after a fixed period
Date Wed, 17 Feb 2016 10:40:16 GMT
Hi everyone,

Merged into Brooklyn yesterday was a useful policy that stops entities 
after a period has elapsed.

Example usage:

location: localhost
services:
- type: org.apache.brooklyn.entity.stock.BasicApplication
   brooklyn.policies:
*  - type: org.apache.brooklyn.policy.action.StopAfterDurationPolicy**
**    brooklyn.config:**
**      lifetime: 4h**
*  brooklyn.children:
   - type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess

The policy is configured to invoke the stop effector on the application 
after four hours have passed.

Hidden inside this is a new DurationSinceSensor, which records the 
duration since it was added to an entity.

You may find this useful if you run multi-user environments in which 
people forget to release their resources.

Sam

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message