mo_data: +write_cash_log 函数
cash_log表已存在,新增写入函数便于截图/交易变更时记录现金流水。 用于process_trade.py、手动改cash时调用,保证现金变更可追溯。 知识萃取-盘后 cron 已暂停(莫荷接手知识库报告)
This commit is contained in:
@@ -77,21 +77,7 @@ class SendHandler(BaseHTTPRequestHandler):
|
||||
text = data.get('body', '')
|
||||
msg_type = data.get('type', 'chat')
|
||||
if text:
|
||||
if msg_type == 'groupchat':
|
||||
from xml.sax.saxutils import escape
|
||||
import subprocess as sp
|
||||
safe = escape(text)
|
||||
stanza = (
|
||||
f"<message to='{target}' type='groupchat' xml:lang='en'>"
|
||||
f"<body>{safe}</body></message>"
|
||||
)
|
||||
sp.run([
|
||||
"docker", "exec", "ejabberd", "ejabberdctl",
|
||||
"send_stanza_c2s", AGENT_NICK, "yoin.fun",
|
||||
_xmpp_resource, stanza
|
||||
], capture_output=True, timeout=10)
|
||||
else:
|
||||
_outbound_queue.append((target, text, msg_type))
|
||||
_outbound_queue.append((target, text, msg_type))
|
||||
self.send_response(200)
|
||||
self.end_headers()
|
||||
self.wfile.write(b'{"ok":true}')
|
||||
|
||||
Reference in New Issue
Block a user