diff --git a/CHANGELOG.md b/CHANGELOG.md index bd64590..772c5eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/) and [Keep a changelog](https://github.com/olivierlacan/keep-a-changelog). ## [Unreleased](https://github.com/idealista/airflow-role/tree/develop) + +## [2.0.7](https://github.com/idealista/airflow-role/tree/2.0.7) + +[Full Changelog](https://github.com/idealista/airflow-role/compare/2.0.6...2.0.7) + +### Fixed +- #114 The "-n" option might not be needed + +## [2.0.6](https://github.com/idealista/airflow-role/tree/2.0.6) + +[Full Changelog](https://github.com/idealista/airflow-role/compare/2.0.5...2.0.6) + ### Fixed - :hammer_and_wrench: Allow intalling only some services - :hammer_and_wrench: Updating travis environment diff --git a/defaults/main/main.yml b/defaults/main/main.yml index 334f543..9a70893 100644 --- a/defaults/main/main.yml +++ b/defaults/main/main.yml @@ -159,7 +159,7 @@ airflow_admin_users: # email: # Service options -airflow_scheduler_runs: 1000 +# airflow_scheduler_runs: 1000 airflow_private_tmp: false airflow_services: diff --git a/templates/airflow-environment-file.j2 b/templates/airflow-environment-file.j2 index 4ac9265..c98f4cb 100644 --- a/templates/airflow-environment-file.j2 +++ b/templates/airflow-environment-file.j2 @@ -19,7 +19,9 @@ # # required setting, 0 sets it to unlimited. Scheduler will get restart after every X runs +{% if airflow_scheduler_runs is defined %} SCHEDULER_RUNS={{ airflow_scheduler_runs }} +{% endif %} AIRFLOW_HOME={{ airflow_app_home }} AIRFLOW_CONFIG={{ airflow_conf_path }}/airflow.cfg diff --git a/templates/airflow-profile.d-file.j2 b/templates/airflow-profile.d-file.j2 index bf1bb04..777d7d7 100644 --- a/templates/airflow-profile.d-file.j2 +++ b/templates/airflow-profile.d-file.j2 @@ -18,7 +18,9 @@ # AIRFLOW_HOME= # # required setting, 0 sets it to unlimited. Scheduler will get restart after every X runs +{% if airflow_scheduler_runs is defined %} export SCHEDULER_RUNS={{ airflow_scheduler_runs }} +{% endif %} if [ -d "{{ airflow_app_home }}/bin" ] ; then export PATH="{{ airflow_app_home }}/bin:$PATH" diff --git a/templates/airflow-scheduler.service.j2 b/templates/airflow-scheduler.service.j2 index bbdd1ff..4f3710c 100644 --- a/templates/airflow-scheduler.service.j2 +++ b/templates/airflow-scheduler.service.j2 @@ -22,7 +22,7 @@ EnvironmentFile={{ airflow_environment_file_folder }}/airflow User={{ airflow_user }} Group={{ airflow_group }} Type=simple -ExecStart={{ airflow_executable }} scheduler -n ${SCHEDULER_RUNS} --pid {{ airflow_pidfile_folder }}-scheduler/scheduler.pid +ExecStart={{ airflow_executable }} scheduler {% if airflow_scheduler_runs is defined %}-n ${SCHEDULER_RUNS} {% endif %}--pid {{ airflow_pidfile_folder }}-scheduler/scheduler.pid KillSignal=SIGINT Restart=always RestartSec=5s