Commit 9b2972bd authored by wang's avatar wang

ws 测试

parent 54392b2a
...@@ -47,7 +47,7 @@ def get_random_one(): ...@@ -47,7 +47,7 @@ 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}} {'$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