Commit 023324c9 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

slaprunner: don't use builtin

"max" and "int" became directly accessible in slapos.recipe.template.
parent 975de22d
...@@ -18,7 +18,7 @@ md5sum = 8b78e32b877d591400746ec7fd68ed4c ...@@ -18,7 +18,7 @@ md5sum = 8b78e32b877d591400746ec7fd68ed4c
[template-runner] [template-runner]
filename = instance-runner.cfg filename = instance-runner.cfg
md5sum = 1216494c03752f0a3c1755e190eed3dc md5sum = 7082e7c29cb55e9af0206178bfc1f181
[template-runner-import-script] [template-runner-import-script]
filename = template/runner-import.sh.jinja2 filename = template/runner-import.sh.jinja2
...@@ -62,7 +62,7 @@ md5sum = 7645048216fcf957f7773534cd0408dc ...@@ -62,7 +62,7 @@ md5sum = 7645048216fcf957f7773534cd0408dc
[template-supervisord] [template-supervisord]
filename = template/supervisord.conf.in filename = template/supervisord.conf.in
md5sum = d294d0dafd265048399de6da8c96345f md5sum = 28f69b57c2835bddfcfbe312563eef51
[template-listener-slapgrid] [template-listener-slapgrid]
filename = template/listener_slapgrid.py.in filename = template/listener_slapgrid.py.in
......
...@@ -820,7 +820,6 @@ template = ${template-supervisord:location}/${template-supervisord:filename} ...@@ -820,7 +820,6 @@ template = ${template-supervisord:location}/${template-supervisord:filename}
rendered = $${directory:etc}/supervisord.conf rendered = $${directory:etc}/supervisord.conf
context = context =
import multiprocessing multiprocessing import multiprocessing multiprocessing
import builtin __builtin__
section supervisord supervisord section supervisord supervisord
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
key listener_slapgrid listener-slapgrid-bin:rendered key listener_slapgrid listener-slapgrid-bin:rendered
......
...@@ -27,7 +27,7 @@ stdout_logfile = {{ supervisord['no_logfile'] }} ...@@ -27,7 +27,7 @@ stdout_logfile = {{ supervisord['no_logfile'] }}
stderr_logfile = {{ supervisord['no_logfile'] }} stderr_logfile = {{ supervisord['no_logfile'] }}
directory = {{ supervisord['directory'] }} directory = {{ supervisord['directory'] }}
{# how many parallel build jobs to spawn when compiling software -#} {# how many parallel build jobs to spawn when compiling software -#}
{% set njobs = builtin.max(1, (multiprocessing.cpu_count() // builtin.int(slapparameter_dict.get('cpu-usage-ratio', 4)))) -%} {% set njobs = max(1, (multiprocessing.cpu_count() // int(slapparameter_dict.get('cpu-usage-ratio', 4)))) -%}
environment = PATH="{{- supervisord['path'] -}}",MAKEFLAGS="-j{{ njobs }}",NPY_NUM_BUILD_JOBS="{{ njobs }}",BUNDLE_JOBS="{{ njobs }}" environment = PATH="{{- supervisord['path'] -}}",MAKEFLAGS="-j{{ njobs }}",NPY_NUM_BUILD_JOBS="{{ njobs }}",BUNDLE_JOBS="{{ njobs }}"
[program:{{- supervisord['slapgrid-cp'] -}}] [program:{{- supervisord['slapgrid-cp'] -}}]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment