We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The use of find_and_modify means only one Job is recovered from stale lock.
find_and_modify
The same query + update expressions work with the PyMongo function update_many which updates all documents that match.
update_many
it = q.collection.update_many({"locked_by": {"$ne": None}, "locked_at": { "$lt": datetime.now() - timedelta(0.125)}},{"$set": {"locked_by": None, "locked_at": None},"$inc": {"attempts": 1}})
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The use of
find_and_modify
means only one Job is recovered from stale lock.The same query + update expressions work with the PyMongo function
update_many
which updates all documents that match.The text was updated successfully, but these errors were encountered: