<commit_before>---
# Coordinate an orderly restart of the cluster if necessary.
#
# The variables in the "when:" clause are populated by the tasks in the worker role. This task
# has been split out from the main role so that it can be performed serially.

- hosts: deconst-worker
  vars_files:
  - vars.yml
  - credentials.yml
  serial: 1
  tasks:

  - name: restart services
    service: name={{ item[1] }}@{{ item[0] }}.service state=restarted
    with_nested:
    - pod_names
    - worker_services
    when: (environment|changed or worker_pulls|changed or worker_units|changed) and not (worker_service_results|changed)
    sudo: yes<commit_msg>Manually coordinate pod restarts.<commit_after>---
# Coordinate an orderly restart of the cluster if necessary.
#
# The variables in the "when:" clause are populated by the tasks in the worker role. This task
# has been split out from the main role so that it can be performed serially.

- hosts: deconst-worker
  vars_files:
  - vars.yml
  - credentials.yml
  serial: 1
  tasks:

  # The service module is smart: when you use it with with_nested or with_items, it consolidates
  # actions into a single invocation of the underlying binary (systemctl). However, this is exactly
  # what we *don't* want here, because then all of the services do the charging herd thing on their
  # load balancers.
  #
  # Instead, manually restart each pod together by invoking systemctl directly.
  - name: restart services
    command: systemctl restart deconst-content@{{ item }}.service deconst-presenter@{{ item }}.service
    with_items:
    - pod_names
    when: (environment|changed or worker_pulls|changed or worker_units|changed) and not (worker_service_results|changed)
    sudo: yes
{'fraction_non_alphanumeric': 0.07710144927536232, 'fraction_numerical': 0.002318840579710145, 'mean_word_length': 3.834733893557423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5161983', 'n_tokens_mistral': 496, 'n_tokens_neox': 478, 'n_words': 209}