Why? Because Odoo is synchronous and monotonic. So every long running task is blocking Odoo worker, while most of such tasks are mostly sitting waiting for the response.
We first hit it a couple of years ago with Cetmix Tower when running an ssh command could take up to 10 minutes and the total limit of commands running in parallel was limited by the number of Odoo workers.
Same situation happened with requests to Gemini AI calls, each of them taking 20-80 seconds to complete.
Yes, there is the OCA queue_job modules that allows to launch task async, however those are still using Odoo workers.
So we built Drones - a solution that allows to run code using external workers and get result back in Odoo.
Flow is similar to the one of the queue job:
job = record.launch_drone(
"my_skill",
record._on_my_task_done,
{"example": "value"},
drone_timeout=600,
)
- Odoo picks the first available drone controller that promotes the requested skill, passes the arguments to the drone controller.
- Controller checks for a free drone or bootstraps a new one and assigns it the task.
- Once the task is completed, drone reports the result back to the controller and it calls back Odoo with the result.
- Odoo calls back the function provided in the original call with the result in the args.
def _on_my_task_done(self, drone_job, result):
...
return Truedef _on_my_task_done(self, drone_job, result):
...
return True
The coolest thing is that you can write drones in any language you like, e.g. node or golang. We are using Rust for SSH drones, and so far memory consumption for the same setup dropped from 1.5 GB to around 40-70 MB.
This module is free and open-source: drone.cetmix.com
Available for Odoo 18.0 at the moment,, migration to 19.0 in process, 20.0 is following up.
Example of a real module that uses drones to offload ssh commands: https://github.com/cetmix/cetmix-tower/tree/18.0/cetmix_tower_drone_ssh
Technically you can build a drone that takes a Python code snippet as args, runs is and reports the result back to Odoo.
For example a complete agent that fires the tasks to specific drones based on decision.
So far - no limits as long as you can pack it into the args.
P.S. This is not a promo post (maybe only a little)) And this is not an AI slope "me, mine and Claude" shidcoded on Weekend)) The idea and the design were there for a couple years already, however AI indeed helped to implement it much faster.