<commit_before>#
# File: services.yml
# Description: Restart vagrant services
#
---

- hosts: "*"

  #
  # Variables
  #
  vars:
    - app_env: 'prod'
    - app_root_dir: '/var/www/casebox-admin'

  #
  # Tasks
  #
  tasks:
    - name: "APP | Update Admin UI sources."
      shell: "cd {{ app_root_dir }}/; git pull origin master;"
      become: yes

    - name: "APP | Fix files permissions."
      shell: "chown vagrant:vagrant {{ app_root_dir }}/ -R"
      become: yes

    - name: "APP | Composer update."
      shell: "composer update --working-dir={{ app_root_dir }}/"

    - name: "APP | Clear cache."
      shell: "php {{ app_root_dir }}/bin/console ca:cl --env={{ app_env }}"

    - name: "APP | Add Admin UI assests."
      shell: "php {{ app_root_dir }}/bin/console assets:install --relative --symlink {{ app_root_dir }}/web --env={{ app_env }}"

    - name: "APP | Fix permissions."
      shell: "chmod 0777 -R {{ app_root_dir }}/{{ item }}"
      with_items:
        - 'var/cache'
        - 'var/logs'
        - 'var/database'
      become: yes

    - name: "APP | Stop dashboard webserver."
      shell: "php {{ app_root_dir }}/bin/console server:stop 0.0.0.0:8000 --env={{ app_env }}"
      ignore_errors: yes
      become: yes

    - name: "APP | Run dashboard webserver."
      shell: "php {{ app_root_dir }}/bin/console server:start 0.0.0.0:8000 --env={{ app_env }}"
      ignore_errors: yes
      become: yes

    - name: "APP | Stop queue."
      shell: "php {{ app_root_dir }}/bin/console app:queue:stop"
      ignore_errors: yes
      become: yes

    - name: "APP | Run queue in background."
      shell: "php {{ app_root_dir }}/bin/console app:queue:start"
      ignore_errors: yes
      become: yes<commit_msg>Reset sessions before start.<commit_after>#
# File: services.yml
# Description: Restart vagrant services
#
---

- hosts: "*"

  #
  # Variables
  #
  vars:
    - app_env: 'prod'
    - app_root_dir: '/var/www/casebox-admin'

  #
  # Tasks
  #
  tasks:
    - name: "APP | Update Admin UI sources."
      shell: "cd {{ app_root_dir }}/; git pull origin master;"
      become: yes

    - name: "APP | Fix files permissions."
      shell: "chown vagrant:vagrant {{ app_root_dir }}/ -R"
      become: yes

    - name: "APP | Composer update."
      shell: "composer update --working-dir={{ app_root_dir }}/"

    - name: "APP | Clear cache."
      shell: "php {{ app_root_dir }}/bin/console ca:cl --env={{ app_env }}"

    - name: "APP | Add Admin UI assests."
      shell: "php {{ app_root_dir }}/bin/console assets:install --relative --symlink {{ app_root_dir }}/web --env={{ app_env }}"

    - name: "APP | Crear previous sessions."
      shell: "rm -r {{ app_root_dir }}/var/sessions/prod"
      become: yes

    - name: "APP | Fix permissions."
      shell: "chmod 0777 -R {{ app_root_dir }}/{{ item }}"
      with_items:
        - 'var/cache'
        - 'var/logs'
        - 'var/database'
        - 'var/sessions'
      become: yes

    - name: "APP | Stop dashboard webserver."
      shell: "php {{ app_root_dir }}/bin/console server:stop 0.0.0.0:8000 --env={{ app_env }}"
      ignore_errors: yes
      become: yes

    - name: "APP | Run dashboard webserver."
      shell: "php {{ app_root_dir }}/bin/console server:start 0.0.0.0:8000 --env={{ app_env }}"
      ignore_errors: yes
      become: yes

    - name: "APP | Stop queue."
      shell: "php {{ app_root_dir }}/bin/console app:queue:stop"
      ignore_errors: yes
      become: yes

    - name: "APP | Run queue in background."
      shell: "php {{ app_root_dir }}/bin/console app:queue:start"
      ignore_errors: yes
      become: yes
{'fraction_non_alphanumeric': 0.15721365638766518, 'fraction_numerical': 0.011013215859030838, 'mean_word_length': 2.305732484076433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 4, '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': '337996', 'n_tokens_mistral': 1283, 'n_tokens_neox': 1252, 'n_words': 331}