Skip to content
Extraits de code Groupes Projets
Valider 770d768f rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

[ADD] variable to force multiprocessing

parent 3efb74a8
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -51,6 +51,8 @@ odoo_prod_example: # To be renamed odoo_prod
db_pass: "odooDbPasswordToBeModified"
# PROD Database name
db: "odoo"
## OPTIONAL - use this variable to force using multiprocessing iso multithreading
# force_odoo_workers: True
## OPTIONAL - only needed if no nonprod_instances are defined
## Custom modules Le Filament (one module per repo)
# custom_modules:
......@@ -124,6 +126,8 @@ odoo_nonprod_instances_example: # To be renamed odoo_nonprod_instances
db: "odoo_test"
## Tag that will be used on the built test Docker image
image_version: "{{ odoo_version }}_test"
## OPTIONAL - use this variable to force using multiprocessing iso multithreading
# force_odoo_workers: True
## Custom modules Le Filament (one module per repo)
custom_modules:
- automatic_bank_statement_import
......
......@@ -49,7 +49,7 @@ smtp_server = smtp
; smtp_user = False
unaccent = True
without_demo = all
{% if ansible_processor_vcpus > 2 %}
{% if ansible_processor_vcpus > 2 or odoo_prod.force_odoo_workers is defined %}
workers = {{ (ansible_processor_vcpus * 2 - 1) | int | abs }}
max_cron_threads = {{ ansible_processor_vcpus | int }}
{% else %}
......
......@@ -45,7 +45,7 @@ services:
co.elastic.logs/multiline.negate: 'true'
co.elastic.logs/multiline.match: "after"
traefik.enable: "true"
{% if ansible_processor_vcpus > 2 %}
{% if ansible_processor_vcpus > 2 or odoo_prod.force_odoo_workers is defined %}
traefik.http.routers.odoo-longpolling.rule: "Host(`{{ odoo_prod.url }}`{% if odoo_prod.url2 is defined %}, `{{ odoo_prod.url2 }}`{% endif %}) && PathPrefix(`/longpolling/`)"
traefik.http.routers.odoo-longpolling.service: "odoo-longpolling"
traefik.http.services.odoo-longpolling.loadbalancer.server.port: "8072"
......
......@@ -35,7 +35,7 @@ services:
labels:
co.elastic.logs/enabled: "false"
traefik.enable: "true"
{% if ansible_processor_vcpus > 2 %}
{% if ansible_processor_vcpus > 2 or item.force_odoo_workers is defined %}
traefik.http.routers.{{ item.dir }}-longpolling.rule: "Host(`{{ item.url }}`) && PathPrefix(`/longpolling/`)"
traefik.http.routers.{{ item.dir }}-longpolling.service: "{{ item.dir }}-longpolling"
traefik.http.services.{{ item.dir }}-longpolling.loadbalancer.server.port: "8072"
......@@ -52,9 +52,11 @@ services:
- --smtp-port=1025
- --database={{ item.db }}
- --init=web_environment_ribbon
{% if ansible_processor_vcpus > 2 %}
{% if ansible_processor_vcpus > 2 or item.force_odoo_workers is defined %}
- --workers=2
- --max-cron-threads=1
{% elif odoo_prod.force_odoo_workers is defined %}
- --workers=0
{% endif %}
db:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter