Is there a function (or variable) that returns the worker variable as set by the config file or startup option? Ideally something that would be XML-RPC compatible.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
After much searching in the code I didn't find anything that would return the required value. I created a simple one-liner in web_services.py to achieve the wanted behavior.
Here is what was done:
-Added 'get_workers' to the if in the dispatch method from the common class.
-Added the exp_get_workers defined as such:
def exp_get_workers(self):
return tools.config.get('workers', 1)
Counting records is not as easy as it seems to be. You cancreate easliy report for it. If you want XML-RCP you need to create it by hand.
Marek Mosiewicz
http://consultantodoo.com
What I need is the configured thread concurrency as set by the workers configuration variable (or startup variable). I am building a XML-RPC library for .NET integration and would like to be able to process a few things asynchronously (As this is meant to create hundreds of recordings + a few hundred searches or gets) at the press of a button and knowing the maximum thread concurrency is key for an efficient system.
What I need is the configured thread concurrency as set by the workers configuration variable (or startup variable). I am building a XML-RPC library for .NET integration and would like to be able to process a few things asynchronously (As this is meant to create hundreds of recordings + a few hundred searches or gets) at the press of a button and knowing the maximum thread concurrency is key for an efficient system.
--
Michael St-Georges Sent by Odoo Inc. using Odoo. about Forum Post False
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
worker variable ? Your question is not clear. Please explain waht you want to get.
There is a worker configuration directive (or runtime option) to allow OpenERP/Odoo to run in multi-threaded mode. I would like to get the value of this setting. I have an application that creates a huge bunch of sales order line via XMLRPC and would like to process them in parallel, but I would like the application to know how many threads it could request at once.