From fdf631b2df1edc74e69c825731cfeebfee20ef98 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sat, 15 Dec 2018 15:38:19 +0100 Subject: [PATCH] new: [odoo-tecnativa] add automatically ``--workers=WORKERS`` to command line --- odoo-tecnativa/hooks/init | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/odoo-tecnativa/hooks/init b/odoo-tecnativa/hooks/init index f375d47d..8f4c985c 100755 --- a/odoo-tecnativa/hooks/init +++ b/odoo-tecnativa/hooks/init @@ -22,3 +22,13 @@ odoo_uid=$(get_odoo_uid) mkdir -p "$LIB" ## XXXvlab: this one can fail if files are removed (from sessions dir) find "$LIB" \! -user "$odoo_uid" -exec chown -v "$odoo_uid" {} + || true + +## workers management +workers=$(options-get workers 2>&1) || true +workers=${workers:-1} + +init-config-add " +$SERVICE_NAME: + command: + - \"--workers=${workers}\" +"