logger.info('Start Tick! The time is '+str(os.getpid())+': %s' % datetime.now()) # 业务代码 logger.info('Stop Tick! The time is '+str(os.getpid())+': %s' % datetime.now()) except LockAcquiringError: print('Something happened during normal operation. We just log it.') except LockError: print('Something is really wrong and we prefer to raise the exception') except Exception as e: print(e) print('Something else went wrong')