VERSION | = | '0.13.1' | The String version number for this package. | |
LOG_BUFFER_SIZE_DEFAULT | = | 100 | The Integer number of lines of backlog to keep for the logger. | |
PID_FILE_DIRECTORY_DEFAULTS | = | ['/var/run/god', '~/.god/pids'] | An Array of directory paths to be used as the default PID file directory. This list will be searched in order and the first one that has write permissions will be used. | |
DRB_PORT_DEFAULT | = | 17165 | The default Integer port number for the DRb communcations channel. | |
DRB_ALLOW_DEFAULT | = | ['127.0.0.1'] | The default Array of String IPs that will allow DRb communication access. | |
LOG_LEVEL_DEFAULT | = | :info | The default Symbol log level. | |
TERMINATE_TIMEOUT_DEFAULT | = | 10 | The default Integer number of seconds to wait for god to terminate when issued the quit command. | |
STOP_TIMEOUT_DEFAULT | = | 10 | The default Integer number of seconds to wait for a process to terminate. | |
STOP_SIGNAL_DEFAULT | = | 'TERM' | The default String signal to send for the stop command. |
contact_groups | [RW] | internal |
contacts | [RW] | internal |
groups | [RW] | internal |
inited | [RW] | internal |
main | [RW] | internal |
pending_watch_states | [RW] | internal |
pending_watches | [RW] | internal |
running | [RW] | internal |
server | [RW] | internal |
watches | [RW] | internal |
Load the given file(s) according to the given glob.
glob - The glob-enabled String path to load.
Returns nothing.
Match a shortened pattern against a list of String candidates. The pattern is expanded into a regular expression by inserting .* between each character.
pattern - The String containing the abbreviation. list - The Array of Strings to match against.
Examples
list = %w{ foo bar bars } pattern = 'br' God.pattern_match(list, pattern) # => ['bar', 'bars']
Returns the Array of matching name Strings.
Load a config file into a running god instance. Rescues any exceptions that the config may raise and reports these back to the caller.
code - The String config file contents. filename - The filename of the config file. action - The optional String command specifying how to deal with
existing watches. Valid options are: 'stop', 'remove' or 'leave' (default).
Returns a three-tuple Array [loaded_names, errors, unloaded_names] where:
loaded_names - The Array of String task names that were loaded. errors - The String of error messages produced during the load phase. Will be a blank String if no errors were encountered. unloaded_names - The Array of String task names that were unloaded from the system (if 'remove' or 'stop' was specified as the action).
Log lines for the given task since the specified time.
watch_name - The String name of the task (may be abbreviated). since - The Time since which to report log lines.
Raises God::NoSuchWatchError if no tasks matched. Returns the String of newline separated log lines.
Unmonitor and stop all tasks.
Returns true on success, false if all tasks could not be stopped within 10 seconds
Force the termination of god.
Never returns because the process will no longer exist!