Commit 54392b2a authored by wang's avatar wang

ws 测试

parent 3d1dbe79
...@@ -46,7 +46,8 @@ def get_random_one(): ...@@ -46,7 +46,8 @@ def get_random_one():
res = list(db.env_shape.aggregate([ res = list(db.env_shape.aggregate([
{'$match': query}, {'$match': query},
{'$sample': {'size': 1}} {'$sample': {'size': 1}},
{'$sort': {'updatetime': 1}}
])) ]))
path = f'/tmp/{str(res[0]["_id"])}' path = f'/tmp/{str(res[0]["_id"])}'
with open(path, 'w') as f: with open(path, 'w') as f:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment