Allow running Mistral API service without uWSGI

While running Mistral API service within uWSGI, Mistral's Cron
Triggers do not create Workflow Exectuions. This change would disable
Cron Triggers for all existing installations as running API service
within uWSGI stays enabled by default.

Change-Id: I25b622de40c02f3cc410070e04e2d5d0fd67abc9
This commit is contained in:
Danila Balagansky 2022-07-13 18:48:04 +03:00
parent fd223ea205
commit 05b37e5542
2 changed files with 8 additions and 1 deletions

View File

@ -52,6 +52,8 @@ mistral_pip_install_args: "{{ pip_install_options | default('') }}"
mistral_memcached_servers: "{{ memcached_servers }}"
mistral_api_use_uwsgi: true
# Services
mistral_services:
mistral-notifier:
@ -77,7 +79,8 @@ mistral_services:
service_name: mistral-api
init_config_overrides: "{{ mistral_api_init_overrides }}"
start_order: 2
wsgi_app: true
execstarts: "{{ _mistral_bin }}/mistral-server --server api"
wsgi_app: "{{ mistral_api_use_uwsgi }}"
wsgi_name: mistral-wsgi-api
uwsgi_overrides: "{{ mistral_api_uwsgi_ini_overrides }}"
uwsgi_bind_address: "{{ mistral_bind_address }}"

View File

@ -6,8 +6,12 @@ use_journal = True
transport_url = {{ mistral_oslomsg_rpc_transport }}://{% for host in mistral_oslomsg_rpc_servers.split(',') %}{{ mistral_oslomsg_rpc_userid }}:{{ mistral_oslomsg_rpc_password }}@{{ host }}:{{ mistral_oslomsg_rpc_port }}{% if not loop.last %},{% else %}/{{ mistral_oslomsg_rpc_vhost }}{% if mistral_oslomsg_rpc_use_ssl | bool %}?ssl=1&ssl_version={{ mistral_oslomsg_rpc_ssl_version }}&ssl_ca_file={{ mistral_oslomsg_rpc_ssl_ca_file }}{% else %}?ssl=0{% endif %}{% endif %}{% endfor %}
[api]
host = {{ mistral_bind_address }}
allow_action_execution_deletion = True
[cron_trigger]
enabled = {{ not mistral_api_use_uwsgi }}
[database]
connection = mysql+pymysql://{{ mistral_galera_user }}:{{ mistral_galera_password }}@{{ mistral_galera_address }}/{{ mistral_galera_database }}?charset=utf8{% if mistral_galera_use_ssl | bool %}&ssl_verify_cert=true{% if mistral_galera_ssl_ca_cert | length > 0 %}&ssl_ca={{ mistral_galera_ssl_ca_cert }}{% endif %}{% endif +%}
max_overflow = {{ mistral_db_max_overflow }}