It can also be used for writing different Ruby services or applications.
Features:
- Servolux::Threaded - when included into a class, it gives an activity thread that will run some code at a regular interval. Provides methods to start and stop the thread, report on the running state, and join the thread to wait for it to complete.
- Servolux::Server - a template server class that handles the mundane work of creating / deleting a PID file, reporting running state, logging errors, starting the service, and gracefully shutting down the service.
- Servolux::Piper - an extension of the standard Ruby fork method that opens a pipe for communication between parent and child processes. Ruby objects are passed between parent and child allowing, for example, exceptions in the child process to be passed to the parent and raised there.
- Servolux::Daemon - a robust class for starting and stopping daemon processes.
- Servolux::Child - adds some much needed funtionality to child processes created via Ruby‘s IO#popen method. Specifically, a timeout thread is used to signal the child process to die if it does not exit in a given amount of time.
What is new in this release:
- Minor Enhancements:
- Added in the ability to vary the Prefork worker pool size.
- Pass original child exception backtrace up the exception chain.
- Improved child process wellness checks in Piper and Child classes.
- Bug Fixes:
- Typo and documentation fixes.
What is new in version 0.9.7:
- Minor Enhancements:
- Added `after_fork` and `before_exec` handlers for the Daemon class.
- Bug Fixes:
- ThreadError when stopping threaded objects.
What is new in version 0.9.6:
- Threaded objects run immediately (sleep after running).
- Added a "timed_out?" method in the Prefork::Worker class.
What is new in version 0.6.1:
- Added a method to wait for server shutdown in the Server class
Requirements:
- Ruby interpreter 1.8
- JRuby interpreter 1.9
Comments not found