def sigterm_handler(self, recvd_signal, frame):
        if self.failure_in_flight:
            self.logger_instance.logit("INFO",
                                       "Atropos received SIGTERM, "
                                       "but a failure is inflight. "
                                       "Ignoring. Pid: {0}, "
                                       "Service name in fate book: {1}"
                                       .format(os.getpid(), self.service),
                                       log_level="WARNING")
        else:
            self.logger_instance.logit("INFO",
                                       "Atropos received SIGTERM. Pid: "
                                       "{0}, Service name in fate book:"
                                       "{1}. Wrapping up and exiting"
                                       .format(os.getpid(), self.service),
                                       log_level="WARNING")
            sys.exit(0)
A context manager to log messages with "start: " and "finish: "
dataset/ETHPy150Open linkedin/simoorg/src/simoorg/atropos.py/Atropos.sigterm_handler--crossover with--dataset/ETHPy150Open UDST/urbansim/urbansim/utils/logutil.py/log_start_finish