18 lines
465 B
Python
18 lines
465 B
Python
import app
|
|
from app import key, buf, load_indices_from_es
|
|
from datetime import datetime, timedelta
|
|
import threading
|
|
from datetime import datetime, timezone
|
|
|
|
# 传递数据并启动 Flask 应用
|
|
# store_to_es(key, buf, 'customer')
|
|
|
|
|
|
ret = load_indices_from_es(key, 'customer', buf)
|
|
if not ret:
|
|
exit("客服AI员工不能拥有数据库。")
|
|
|
|
customer_data=buf[key]['customer database']
|
|
app.set_customer_data(customer_data)
|
|
app.app.run(host="0.0.0.0", port=5001)
|