thephpleague / monga

Simple and swift MongoDB abstraction.
MIT License
331 stars 30 forks source link

Need help on MongoCursor Timeout Option #16

Closed maxtrunk closed 9 years ago

maxtrunk commented 9 years ago

@bcrowe
Hey Bryan, First of all, happy new year :) I am having some timeout issues with my app, so that I would like to update my MongoCursor timeout option to -1. I notice there is a public timeout function in builder, and I know I can do something like: $this->collection($name)->find( $param )->timeout(-1); But, instead of modify all my query, is there a way to set it globally over my app? I've tried MongoCursor::$timeout = -1; but it throw errors on me. I am not sure how I can call that timeout function in Builder.php.

Thanks in advance for your help.

Tony

maxtrunk commented 9 years ago

Just figure it out :100: ^_^