Answer the question
In order to leave comments, you need to log in
Can a race condition in a multi-threaded application cause problems when working with the database and how to deal with it?
I have a Python - application with Huey (task manager). When I receive an external request, I call some pipeline, n times for each request:
pipe = (
fetch_page.s(link)
.then(process_page)
.then(process_image)
)
huey.enqueue(pipe)
Answer the question
In order to leave comments, you need to log in
Different authorization methods have different levels of restrictions. For websites, they are the strictest, but Standalone already has the maximum capabilities.
Given these restrictions, there is nothing left to do but manually receive an access token and enter it into the database. The main thing is not to forget to take care of its reliable storage, otherwise access to the page can be obtained by outsiders.
I realized that I forgot to answer the question here. No, if you didn't turn off the asknowledged writes function , this won't cause problems: by the time insert_one returns an ID, the document is guaranteed to be saved to the collection. Ref: stackoverflow.com/questions/59666342/does-pymongo-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question