Tuesday, April 29, 2025
2 changes · 18.0
Enhancements to existing features
Odoo can now restart its main server more smoothly when configured for graceful reload, helping reduce service interruptions during maintenance or deployments. The change also improves compatibility with system-managed startup setups, making operations more reliable for hosted environments.
Original PR description
Before, the only reload option that existed was the `server_phoenix` mode that reexecuted the server upon receival of the SIGHUP signal. This came with a consequential downtime while the server was…
Before, the only reload option that existed was the `server_phoenix` mode that reexecuted the server upon receival of the SIGHUP signal. This came with a consequential downtime while the server was restarting.
We introduce the new flag
--graceful-reload
when starting odoo-bin that allows to reload the server with no downtime. (POSIX + Prefork mode)
When this flag is set and a SIGHUP signal is sent to the main server, it will initiate the shutdown procedure in a separate process that will first wait until the main process has finished restarting and is ready to handle new incoming HTTP requests.
The reexecuted server will reuse the same socket to ensure no connections are dropped and notify its stopping fork with a SIGHUP signal, which will then proceed with the shutdown procedure. It will not be able to reap the children processes, so it will monitor them closely in a slightly different way. The newly restarted server will reap them without consequence.
Note: the gevent longpolling server is not handled gracefully and a very unlikely race condition could put a traceback in the logs should the longpolling server start before it's stopped (address already in use), but it'll retry to start it continuously so it won't cause any issue.
We also add support for systemd's socket activation with the prefork server.Product images sent to UrbanPiper are now converted to a more compatible format, reducing the chance of missing or broken menu images on connected delivery platforms. Tax code formatting for Swiggy and Zomato has also been corrected, helping orders and menu data carry the right tax information.
Original PR description
*: pos_urban_piper_swiggy, pos_urban_piper_zomato In this commit: === - Added _get_jpeg_datas method to convert WebP images to JPEG using QWeb for better compatibility with UrbanPiper. - Updated _get_public_image_url to use the new JPEG conversion logic and improve attachment handling. - Removed convert_to_webp image option from product form view to ensure JPEG usage. - Corrected tax code generation logic for Swiggy and Zomato to avoid incorrect string interpolation.