Commit d173d628 authored by 段英荣's avatar 段英荣

Merge branch 'add_mysql_client' into 'master'

假设数据库连接异常,强制退出程序,supervisor重启linub

See merge request !442
parents 371576d9 bb02cf04
...@@ -16,7 +16,7 @@ from search.utils.common import * ...@@ -16,7 +16,7 @@ from search.utils.common import *
import libs.tools as Tools import libs.tools as Tools
from trans2es.models.pictorial import CommunityPictorialHomeFeed from trans2es.models.pictorial import CommunityPictorialHomeFeed
from libs.error import logging_exception from libs.error import logging_exception
import sys import os
class KafkaManager(object): class KafkaManager(object):
consumser_obj = None consumser_obj = None
...@@ -320,5 +320,5 @@ class CollectData(object): ...@@ -320,5 +320,5 @@ class CollectData(object):
except: except:
logging_exception() logging_exception()
logging.error("catch exception,err_msg:%s" % traceback.format_exc()) logging.error("catch exception,err_msg:%s" % traceback.format_exc())
sys.exit() # 假设数据库连接异常,强制退出程序,supervisor重启linub
return False os._exit(0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment