Commit 03d6f3f8 by ‘chizw’

[+]配置优化

1 parent 3376056c
...@@ -102,16 +102,16 @@ def consume_kafka(): ...@@ -102,16 +102,16 @@ def consume_kafka():
# funasr_service.handle_process(str(message.value.decode('utf-8'))) # funasr_service.handle_process(str(message.value.decode('utf-8')))
def consumer_process_init(): def consumer_process_init():
try:
process_name = str(multiprocessing.current_process().name) process_name = str(multiprocessing.current_process().name)
log.info(f"consumer_process_init process_name:{process_name}") log.info(f"consumer_process_init process_name:{process_name}")
res = funasr_db.select_process_fail_task(process_name) # try:
if res is not None: # res = funasr_db.select_process_fail_task(process_name)
data = {"task_id": res[0]["task_id"]} # if res is not None:
message = json.dumps(data).encode('utf-8') # data = {"task_id": res[0]["task_id"]}
funasr_service.handle_process(str(message)) # message = json.dumps(data).encode('utf-8')
except Exception as e: # funasr_service.handle_process(str(message))
log.error(f"consumer_process_init_error process_name:{process_name}", e) # except Exception as e:
# log.error(f"consumer_process_init_error process_name:{process_name}", e)
def consumer_process_callback(res): def consumer_process_callback(res):
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!