-
Type: Improvement
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 0.1
-
Component/s: None
-
None
Within my project, we tried to use `MotorDatabase.authenticate` when starting up our application, and it was tricky because it’s an async method, but the Tornado IOLoop hasn’t started yet, so we can’t use yield to make it block... and we actually do want it to block.
We since discovered that we can work around this and obviate the need to use `authenticate` by passing a MongoDB URI to the MotorReplicaSetClient, and including the credentials in that URI.
But since `authenticate` is in the docs, it isn’t unreasonable to think that others will see it and try to use it, and will encounter similar issues that my team did… the option of an `authenticate_sync` method would be handy and would be consistent with the existence of `MotorReplicaSetClient.open_sync`.