Metadata-Version: 1.1
Name: taskforce
Version: 0.2.0
Summary: Taskforce starts and restarts daemon processes.
It will detect executable and/or module changes and automatically restart the affected processes.
Home-page: https://github.com/akfullfo/taskforce
Author: Andrew Fullford
Author-email: pypi102014@fullford.com
License: Apache License, Version 2.0
Download-URL: https://github.com/akfullfo/taskforce/tarball/0.2.0
Description: This supports python 2.7 and python 3 on Unix derivatives.  It has specific
        support for select.kqueue on MacOS and \*BSD and the inotifyx bindings for
        Linux inotify.  If neither of these facilities is available, `taskforce`
        operates in polling mode which adds some latency and processing overhead but
        is functionally the same.
        
        Commands to be run are defined in a configuration file in YAML format.  Let's go
        straight to a quick example::
        
            {
                "tasks": {
                    "sshd": {
                        "control": "wait",
                        "commands": { "start": [ "/usr/sbin/sshd", "-D" ] }
                    },
                    "ntpd": {
                        "control": "wait",
                        "requires": "sshd",
                        "defines": { "conf": "/etc/ntp.conf" },
                        "commands": { "start": [ "/usr/sbin/ntpd", "-c", "{conf}", "-n"] },
                        "events": [
                            { "type": "self", "command": "stop" },
                            { "type": "file_change", "path": "{conf}", "command": "stop" }
                        ]
                    }
                }
            }
        
        In this example, `taskforce` starts `sshd` and then starts `ntpd`.  `taskforce`
        is set to wait on both programs and both programs are started so that they will
        not detach themselves.  If either program exits, it will be restarted.
        
        `ntpd` is run with a couple of extra features.  First, it defines a tag for the
        configuration file name.  This is convenient for when the element is used in
        multiple places.  It also adds two events.  The first fires if the executable
        file changes, and the second fires if the configuration file changes.  The event
        type ``self`` is shorthand for the equivalent ``file_change`` event.  In both cases,
        the event will cause the task to be stopped.  As the task has the ``wait``
        control, it will be immediately restarted.
        
        Visit `<https://github.com/akfullfo/taskforce/>`_ for more information.
        
Platform: Linux
Platform: BSD
Platform: Mac OS X
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: No Input/Output (Daemon)
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: POSIX :: BSD
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: System :: Distributed Computing
Classifier: Topic :: System :: Software Distribution
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires: PyYAML
Provides: taskforce
