Esempio n. 1
0
class ChurchProcess(object):

    def __init__(self):
        self.thread = None

    def start(self):
        if file_nonempty(settings.CHURCH_INPUT_FILE):
            self.thread = AsyncThread(settings.MAKE_SCHEME_COMMAND("./church-loop.ss"))
            self.thread.start()
        else:
            logger.info("input file empty, skipping church-loop...")

    def stop(self):
        if self.thread:
            self.thread.stop()

    def restart(self):
        self.stop()
        self.start()

    def show_status(self):
        if self.thread:
            out = self.thread.out.read_new()
            err = self.thread.err.read_new()
            if out.strip():
                logger.info(out)
            if err.strip():
                logger.info(err)
Esempio n. 2
0
class ChurchProcess(object):

    def __init__(self):
        self.thread = None

    def start(self):
        if file_nonempty(settings.CHURCH_INPUT_FILE):
            self.thread = AsyncThread(settings.MAKE_SCHEME_COMMAND("./church-loop.ss"))
            self.thread.start()
        else:
            logger.info("input file empty, skipping church-loop...")

    def stop(self):
        if self.thread:
            self.thread.stop()

    def restart(self):
        self.stop()
        self.start()

    def show_status(self):
        if self.thread:
            out = self.thread.out.read_new()
            err = self.thread.err.read_new()
            if out.strip():
                logger.info(out)
            if err.strip():
                logger.info(err)
Esempio n. 3
0
 def start(self):
     if file_nonempty(settings.CHURCH_INPUT_FILE):
         self.thread = AsyncThread(settings.MAKE_SCHEME_COMMAND("./church-loop.ss"))
         self.thread.start()
     else:
         logger.info("input file empty, skipping church-loop...")
Esempio n. 4
0
 def start(self):
     if file_nonempty(settings.CHURCH_INPUT_FILE):
         self.thread = AsyncThread(settings.MAKE_SCHEME_COMMAND("./church-loop.ss"))
         self.thread.start()
     else:
         logger.info("input file empty, skipping church-loop...")