1
0
angie-conv-image/angie/j2cfg.dist/core-worker-env.txt.j2
Konstantin Demin a69d6c2920
refactor environment handling
also:
- drop "njs" directories (not actually used nor useful)
- rework jinja filters: more functions, shorter names, etc.
2024-07-23 00:03:46 +03:00

11 lines
413 B
Django/Jinja

{#- prologue -#}
{%- set s_vars = ['MALLOC_ARENA_MAX', 'GLIBC_TUNABLES', 'MALLOC_CONF'] -%}
{%- set c_env = ( j2cfg.core_worker_env or [] ) | any_to_env_dict -%}
{%- set c_vars = c_env | dict_keys -%}
{%- set c_vars_preserve = c_env | dict_empty_keys -%}
{%- set vars_preserve = ( c_vars_preserve + ( s_vars | list_diff(c_vars) )) | sort -%}
{#- main part -#}
{%- for k in vars_preserve -%}
{{ k }}
{% endfor -%}