2d042dd2bdf5b6286c3784c3a564599d8c82e1ac
Start odoo in threading mode with bus installed. Login in the browser using any internal user. Make sure the browser call the /longpolling/poll uri. While the browser is waiting for a response, stop the server. The server takes up to 50 seconds to stop. When started in threading mode, a request to /longpolling/poll is served by a casual http thread. It searches for messages enqueued in the bus and returns them. If there are no message for the user in the queue yet, it creates a `threading.Event`, attach it to the user in a shared dictionnary and `wait()` on it with a timeout of 50 seconds (hardcoded value). When the bus thread (the one responsible to listen on the database) receives new messages, it `set()` the events which resume any http thread that was waiting. Because when we stop the server, there is no way to server new requests, there are no way new messages arrive in the bus. All the threads that were waiting for a new message will just wait until the event timeouts which slow down the shutdown of the server. Now we actively `set()` all events in order to resume all those workers when we stop the server. The `ImDispatch.poll` signature has been changed too so it is possible to change (via code) the hardcoded default. The function was using the object referenced by `TIMEOUT` at the time the function was defined, using `timeout None` then `if None: timeout=TIMEOUT` ensures we lookup the variable. closes odoo/odoo#64530 Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%