Skip to content

Commit

Permalink
Added debugging for query counter
Browse files Browse the repository at this point in the history
  • Loading branch information
rozza committed Jun 4, 2013
1 parent d94a191 commit 0d35e3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mongoengine/context_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ def __exit__(self, t, value, traceback):

def __eq__(self, value):
""" == Compare querycounter. """
return value == self._get_count()
counter = self._get_count()
if value != counter:
print [x for x in self.db.system.profile.find()]
return value == counter

def __ne__(self, value):
""" != Compare querycounter. """
Expand Down

2 comments on commit 0d35e3a

@wojcikstefan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it shouldn't be in the master. Is it only temporary?

@rozza
Copy link
Contributor Author

@rozza rozza commented on 0d35e3a Jun 5, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this function has intermittent failures on travis that are hard to replicate locally.

I think its probably an ensureIndex call being there but have added some debugging to try and find it! I will comment that in the code :/ as I should have made that explicit.

Please sign in to comment.