Пример #1
0
    def sodd_action(daemon=('d', daemon)):
        """run sodd """
        from sodd.main import run_ci
        base_path = os.path.abspath('.')

        if daemon in ('start', 'stop'):
            log = os.path.abspath('sodd.log')
            pid = os.path.abspath('sodd.pid')
            d = Daemon(pid, stdout=log, stderr=log)
            def run():
                run_ci(base_path, config)
            d.run = run
            # start/stop
            getattr(d, daemon)()
        elif daemon == '':
            run_ci(base_path, config)
        else:
            print "Error use 'start'/'stop' for daemon mode, or None"
Пример #2
0
 def run():
     run_ci(base_path, config)