![]() Response = requests. 14 d., How to Start Background Process in Python We will be using subprocess python module for this. Due to this, the multiprocessing module allows the programmer to fully leverage multiple processors on a given machine. Compared to using the Pool interface directly, the concurrent. How to run python script as a background process. The multiprocessing package offers both local and remote concurrency, effectively side-stepping the Global Interpreter Lock by using subprocesses instead of threads. My question is: is this an async problem or a multithread problem and why? I would like to note that my question is more conceptual then about the actual code. offers a higher level interface to push tasks to a background process without blocking execution of the calling process. I would like my users to be able to use the other features of the website, or more importantly even initiate another instance of this function, while this runs. ![]() An example of how it would look is below. The initial data is subtracted from the final data and result the data that is 'attained' in that 30 minutes and is upserted to a database. ![]() The route then sleeps for 30 minutes, and then triggers the same exact API response. This triggers an API request that takes gets their initial data. The route is supposed to give the user an analysis of their data after 30 minutes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |