Archery
Archery copied to clipboard
mongo工单执行错误
重现步骤
1.填写工单SQL db.test.insertMany([{ test1:1 }]); 2.中间所有人审核 3.点击立即执行
预期外的结果
报错
local variable 'msg' referenced before assignment : Traceback (most recent call last):
File "/opt/venv4archery/lib/python3.9/site-packages/django_q/cluster.py", line 432, in worker
res = f(*task["args"], **task["kwargs"])
File "/opt/archery/sql/utils/execute_sql.py", line 44, in execute
return execute_engine.execute_workflow(workflow=workflow_detail)
File "/opt/archery/sql/engines/mongo.py", line 404, in execute_workflow
return self.execute(
File "/opt/archery/sql/engines/mongo.py", line 410, in execute
self.get_master()
File "/opt/archery/sql/engines/mongo.py", line 368, in get_master
master = self.exec_cmd(sql)
File "/opt/archery/sql/engines/mongo.py", line 362, in exec_cmd
return msg
UnboundLocalError: local variable 'msg' referenced before assignment

日志文本
No response
版本
1.9.0
部署方式
Docker
是否还有其他可以辅助定位问题的信息?比如数据库版本等
No response
https://github.com/hhyo/Archery/blob/813a16e37fa0ad63eaa3de80ceed11522d41e6a7/sql/engines/mongo.py#L282
确认下这几个信息是否有配置
#1893