Skip to content

Commit

Permalink
pep8 sample doc manager
Browse files Browse the repository at this point in the history
  • Loading branch information
stedile committed Aug 6, 2012
1 parent 28ce60e commit 0b94d04
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@
.DS_Store
/test/data
/test/logs
/dist
14 changes: 7 additions & 7 deletions mongo-connector/doc_managers/sample_doc_manager.py
Expand Up @@ -51,18 +51,18 @@ def __init__(self, url=None, auto_commit=True):
It should raise a SystemError exception if the URL is not valid.
"""
raise exceptions.NotImplementedError

def stop(self):

"""This method must stop any threads running from the DocManager.
In some cases this simply stops a timer thread, whereas in other
DocManagers it does nothing because the manager doesn't use any
"""This method must stop any threads running from the DocManager.
In some cases this simply stops a timer thread, whereas in other
DocManagers it does nothing because the manager doesn't use any
threads. This method is only called when the MongoConnector is
forced to terminate, either due to errors or as part of normal
procedure.
"""
raise exceptions.NotImplementedError

def upsert(self, doc):
"""Update or insert a document into engine.
The documents has ns and _ts fields.
Expand Down Expand Up @@ -94,8 +94,8 @@ def search(self, start_ts, end_ts):
This method is only used by rollbacks to query all the documents in
engine within a certain timestamp window. The input will be two longs
(converted from Bson timestamp) which specify the time range.
The 32 most significant bits are the Unix Epoch Time, and the other
(converted from Bson timestamp) which specify the time range.
The 32 most significant bits are the Unix Epoch Time, and the other
bits are the increment. For all purposes, the function should just
do a simple search for timestamps between these values
treating them as simple longs. The return value should be an iterable
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -33,7 +33,7 @@
doclines = __doc__.split("\n")

setup(name="mongo-connector",
version="0.8.4",
version="0.8.5",
maintainer="10Gen",
maintainer_email="leonardo.stedile@10gen.com",
#url = "https://github.com/AayushU/mongo-connector",
Expand Down

0 comments on commit 0b94d04

Please sign in to comment.