Skip to content

Should I set reuse=False when pymongo's fork unsafety is concerned? #37

Description

@tarjintor

I use log4mongo with celery, celery is in prefork model.
Then every process use the same MongoHandler,since I import it bofore fork happened.
if I don't set reuse=False, there is a warning from pymongo for there are multil processes share the same mongo client, as https://api.mongodb.com/python/current/faq.html says,it's not fork safe.
So, should I set reuse=False when prefork is used?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions