Commit 35cf62bc by ‘chizw’

[+]补偿优化

1 parent 93cbc487
Showing 1 changed file with 6 additions and 3 deletions
...@@ -224,9 +224,12 @@ async def create_url(param: UrlParam): ...@@ -224,9 +224,12 @@ async def create_url(param: UrlParam):
def start_kafka(): def start_kafka():
kafka_thread = threading.Thread(target=funasr_consumer.consume_kafka) try:
kafka_thread.daemon = True # 将线程设置为守护线程,当主线程结束时,该线程也会自动结束 kafka_thread = threading.Thread(target=funasr_consumer.consume_kafka)
kafka_thread.start() kafka_thread.daemon = True # 将线程设置为守护线程,当主线程结束时,该线程也会自动结束
kafka_thread.start()
except Exception as e:
log.error("funasr start_kafka Exception: " + str(traceback.format_exc()))
def start_process(): def start_process():
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!