Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 6dd702c

Browse files
authored
don't try to subtract dicts from each other (#51)
* don't try to subtract dicts from each other mongo 3.6 has added some additional information in the form of dicts to the network stats that is causing new relic stats collection to fail also upgrade to circleci 2
1 parent 3e60d26 commit 6dd702c

File tree

5 files changed

+59
-34
lines changed

5 files changed

+59
-34
lines changed

.circleci/config.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: 2
2+
jobs:
3+
test:
4+
docker:
5+
- image: python:3.5
6+
working_directory: ~/python-client
7+
steps:
8+
- checkout
9+
10+
- run:
11+
command: pip install --upgrade pip tox
12+
13+
- run:
14+
command: |
15+
tox -e lint
16+
tox -e py35
17+
18+
pypi_upload:
19+
docker:
20+
- image: circleci/python:3.5
21+
steps:
22+
- run:
23+
command: tox -e build_pypi
24+
25+
pypi_upload_rc:
26+
docker:
27+
- image: circleci/python:3.5
28+
steps:
29+
- run:
30+
command: tox -e build_testpypi
31+
32+
workflows:
33+
version: 2
34+
test:
35+
jobs:
36+
- test
37+
pypi_upload:
38+
jobs:
39+
- pypi_upload:
40+
requires:
41+
- test
42+
filters:
43+
tags:
44+
only:
45+
- /^[0-9]+.[0-9]+.[0-9]+$/
46+
47+
- pypi_upload_rc:
48+
requires:
49+
- test
50+
filters:
51+
tags:
52+
only:
53+
- /^[0-9]+.[0-9]+.[0-9]+-rc[0-9]+$/
54+
55+
56+

circle.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

objectrocket/instances/mongodb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def _compile_new_relic_stats(self, stats_this_second, stats_next_second):
195195
first_doc = stats_this_second['aggregate_server_statistics'][subdoc]
196196
second_doc = stats_next_second['aggregate_server_statistics'][subdoc]
197197
keys = set(first_doc.keys()) | set(second_doc.keys())
198-
server_statistics_per_second[subdoc] = {key: int(second_doc[key]) - int(first_doc[key]) for key in keys}
198+
server_statistics_per_second[subdoc] = {key: int(second_doc[key]) - int(first_doc[key]) for key in keys if isinstance(first_doc[key], int)}
199199
for node1, node2 in zip(stats_this_second['opcounters_per_node'], stats_next_second['opcounters_per_node']):
200200
node_opcounters_per_second = {}
201201
for repl, members in node2.items():

requirements/dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ flake8>=2.1.0
44
mock>=1.0.1
55
pytest>=2.5.2
66
pytest-cov>=1.7.0
7-
setuptools>=2.1
7+
setuptools==40.2.0
88
sphinx_rtd_theme
99
tox>=2.1
1010
wheel>=0.22.0

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from setuptools import find_packages
55
from setuptools import setup
66

7-
VERSION = ('0', '4', '9')
7+
VERSION = ('0', '4', '10')
88
__version__ = '.'.join(VERSION)
99

1010
with open('README.md') as f:

0 commit comments

Comments
 (0)