By the way, I don't think it is a good idea to instanciate a
connection in `get_next_id` because you may expect some issue in
production (if you must pass some arguments to the connection
constructor).
You should put this function into the __init__ and call `self.db`
instead to use the current connection configuration.
I'll see what I can do with the double-called __init__ :
https://github.com/namlook/mongokit/issues/56
N.
> By the way, I don't think it is a good idea to instanciate a
> connection in `get_next_id` because you may expect some issue in
> production (if you must pass some arguments to the connection
> constructor).
Certainly, in a production environment, we cache the connections. This was just a small bit of code to demonstrate the problem. Thanks for opening the ticket.
---
Roy Smith
r...@panix.com