Exemple #1
0
"""
from config.rough import rough_parse_config, setup_log
from daemons.simpleDaemon import Daemon
from docopt import docopt


def run(self):
    setup_log()
    import seshat.framework as fw
    __import__("controllers.controllerMap", globals(), locals())

    fw.serveForever()


if __name__ == "__main__":
    config = rough_parse_config()
    arguments = docopt(__doc__, version='Seshat v1.0.0')

    if arguments["--daemon"] or arguments["stop"] or arguments["restart"]:
        AppDaemon = type('AppDaemon', (Daemon,), {"run": run})
        app = AppDaemon(config["files"]["pid"], stderr=config["files"]["stderr"])
    else:
        App = type('App', (), {"start": run})
        app = App()

    if arguments["start"]:
        app.start()

    if arguments["stop"]:
        app.stop()
Exemple #2
0
"""
from config.rough import rough_parse_config, setup_log
from daemons.simpleDaemon import Daemon
from docopt import docopt


def run(self):
    setup_log("spinner")
    from daemons.spinner.spinner import Spinner

    spinner = Spinner()
    spinner.start()


if __name__ == "__main__":
    config = rough_parse_config("spinner")
    arguments = docopt(__doc__, version='Psh Spinner Daemon v0.1.0')

    if arguments["--daemon"] or arguments["stop"] or arguments["restart"]:
        AppDaemon = type('AppDaemon', (Daemon,), {"run": run})
        app = AppDaemon(config["files"]["pid"], stderr=config["files"]["stderr"])
    else:
        App = type('App', (), {"start": run})
        app = App()

    if arguments["start"]:
        app.start()

    if arguments["stop"]:
        app.stop()
Exemple #3
0
"""
from config.rough import rough_parse_config, setup_log
from daemons.simpleDaemon import Daemon
from docopt import docopt


def run(self):
    setup_log("builder")
    from daemons.builder.builder import Builder

    builder = Builder()
    builder.start()


if __name__ == "__main__":
    config = rough_parse_config("builder")
    arguments = docopt(__doc__, version='Psh Builder Daemon v0.1.0')

    if arguments["--daemon"] or arguments["stop"] or arguments["restart"]:
        AppDaemon = type('AppDaemon', (Daemon,), {"run": run})
        app = AppDaemon(config["files"]["pid"], stderr=config["files"]["stderr"])
    else:
        App = type('App', (), {"start": run})
        app = App()

    if arguments["start"]:
        app.start()

    if arguments["stop"]:
        app.stop()