Skip to content

Commit

Permalink
updated README and made events options in eventlistener
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Crowe committed Apr 10, 2014
1 parent fb7b547 commit 726049c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@
Fixes:

- Fixed typo in fcgi config
- Fixed typo in supervisord config with minfds and minprocs, thanks to @peefourtee
- Typo in README fixed thanks to @hopkinsth
- Removed refreshonly from pip_install exec resource
- Number of syntax fixes thanks to `puppet lint`

Important Changes:

- Lots of input validation has been added **PLEASE** check your config works before upgrading!
- Changed init_extras naming to defaults and cleaned things up.
- Starting and stopping apps is now done with supervisorctl commands to avoid service restarts

Other Changes:

- CSV functions now order things consistently
- Included description for classes and functions
- Expanded spec testing built with Travis CI
- Added rspec-system tests
- Added beaker acceptance tests
- Added greater validation of various parameters
- Added coverage reporting for resources

Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ supervisord::group { 'mygroup':
}
```

### Configure a eventlistener

```ruby
supervisord::eventlistener { 'mylistener':
command => 'command --args',
events => ['PROCESS_STATE', 'PROCESS_STATE_START']
priority => '100',
env_var => 'my_common_envs'
}
```

### Run supervisorctl Commands

Should you need to run a sequence of command with `supervisorctl` you can use the define type `supervisord::supervisorctl`
Expand All @@ -81,7 +92,7 @@ supervisord::supervisorctl { 'restart_myapp':
}
```

You can also just issue a command without specifying a process.
You can also issue a command without specifying a process.

### Development

Expand Down
4 changes: 2 additions & 2 deletions manifests/eventlistener.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
$command,
$ensure = present,
$ensure_process = 'running',
$events = [],
$buffer_size = 10,
$events = undef,
$result_handler = undef,
$env_var = undef,
$process_name = undef,
Expand Down Expand Up @@ -47,8 +47,8 @@
# parameter validation
validate_string($command)
validate_re($ensure_process, ['running', 'stopped', 'removed'])
validate_array($events)
validate_re($buffer_size, '^\d+')
if $events { validate_array($events) }
if $result_handler { validate_string($result_handler) }
if $numprocs { validate_re($numprocs, '^\d+')}
if $numprocs_start { validate_re($numprocs_start, '^\d+')}
Expand Down

0 comments on commit 726049c

Please sign in to comment.