mirror of
https://github.com/odoo/runbot.git
synced 2025-03-16 16:05:42 +07:00
![]() The Runbot Cron is executed on each runbot instance. When the number of instances scales, the time needed for an instance to obtain the cron increases. With this commit, the original runbot_cron is removed. Instead, a cron have to be created to run the _cron_fetch_and_schedule method. This method will fetch the repo and create pending builds. This cron is intended to run only on one runbot instance. This method needs a host parameter to specify which runbot instance will be in charge of this task. On the other hand, a dedicated cron have to be manually created for each runbot instance that will have the build task. Those cron's only have to call the _cron_fetch_and_build method with the runbot hostname as a parameter. This method will then self assign pending builds if there are slots available. All available build slots are reserved in a single LOCKED SQL query. Both methods are intended to last a large amount of time, just a few minutes below the cron timeout to maximize the cron productivity. The timeout is randomized to avoid deadlocks if the runbot instances are started at the same time. So the --limit-time-real parameter have to be set to a minimum of 180 sec (600 or 1200 are probably better targets). |
||
---|---|---|
.. | ||
Dockerfile |