Permalink
Browse files

pep8 sample doc manager

  • Loading branch information...
1 parent 28ce60e commit 0b94d0495f0d7e128e15379265d661aea7bd14f5 @stedile stedile committed Aug 6, 2012
Showing with 9 additions and 8 deletions.
  1. +1 −0 .gitignore
  2. +7 −7 mongo-connector/doc_managers/sample_doc_manager.py
  3. +1 −1 setup.py
View
@@ -3,3 +3,4 @@
.DS_Store
/test/data
/test/logs
+/dist
@@ -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.
@@ -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
View
@@ -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",

0 comments on commit 0b94d04

Please sign in to comment.