Skip to content

Commit 5f87179

Browse files
authored
toolset: Update pymongo to version 4.7.2 (#9038)
1 parent ee9039b commit 5f87179

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ RUN apt-get -yqq update && \
3131
colorama==0.3.1 \
3232
docker==7.0.0 \
3333
mysqlclient==2.2.4 \
34-
pymongo==3.13.0
34+
pymongo==4.7.2
3535

3636
# Collect resource usage statistics
3737
ARG DOOL_VERSION=v1.3.1

toolset/databases/mongodb/mongodb.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import bson
12
import pymongo
23
import traceback
34

@@ -52,19 +53,19 @@ def test_connection(cls, config):
5253
@classmethod
5354
def get_queries(cls, config):
5455
co = cls.get_connection(config)
55-
status = co.admin.command(pymongo.son_manipulator.SON([('serverStatus', 1)]))
56+
status = co.admin.command(bson.son.SON([('serverStatus', 1)]))
5657
return int(status["opcounters"]["query"]) + int(status["opcounters"]["update"]) #get_queries returns all the queries
5758

5859
@classmethod
5960
def get_rows(cls, config):
6061
co = cls.get_connection(config)
61-
status = co.admin.command(pymongo.son_manipulator.SON([('serverStatus', 1)]))
62+
status = co.admin.command(bson.son.SON([('serverStatus', 1)]))
6263
return int(status["opcounters"]["query"]) * cls.get_rows_per_query(co)
6364

6465
@classmethod
6566
def get_rows_updated(cls, config):
6667
co = cls.get_connection(config)
67-
status = co.admin.command(pymongo.son_manipulator.SON([('serverStatus', 1)]))
68+
status = co.admin.command(bson.son.SON([('serverStatus', 1)]))
6869
return int(status["opcounters"]["update"]) * cls.get_rows_per_query(co)
6970

7071
@classmethod

0 commit comments

Comments
 (0)