<commit_before>---
- name: include default step variables
  include_vars: ../../vars/main.yml

- name: Ensure that redis server is installed
  sudo_user: root
  apt: name=redis-server update_cache=yes state=installed
  tags: redis

- name: Switch to using upstart
  template: src=redis_conf.j2 dest="/etc/init/redis-server.conf" 
  tags: redis

- name: Append 'daemonizie=no' to config 
  lineinfile: >
    dest='/etc/redis/redis.conf'
    line='daemonize no'
    insertafter=EOF
    backup='yes'
  tags: redis

- name: Create log directory for celery
  file: path={{project_dir}}/celery
    owner={{remote_user}}
    group={{remote_user}}
    state=directory
  tags: celery

- name: Create supervisor job for celery
  sudo_user: root
  template: src=supervisor_celery_conf.j2 dest="/etc/supervisor/conf.d/webparticipation-celery.conf" mode=644
  tags: celery

- name: Initialise log rotation for Celery logs
  sudo_user: root
  template: src=celery_log.j2
    dest='/etc/logrotate.d/application_name.log'
    owner={{remote_user}}
    group={{remote_user}}
  tags: celery

- name: Copy celery startup script to bin
  sudo_user: root
  template: src=init_celery_conf.j2
    dest='{{virtual_env}}/start_celery'
    owner={{remote_user}}
    group={{remote_user}}
  tags: celery

- name: Re-read the Supervisor config files
  sudo_user: root
  command: supervisorctl reread
  notify: restart webparticipation-celery<commit_msg>Update main.yml<commit_after>---
- name: include default step variables
  include_vars: ../../vars/main.yml

- name: Ensure that redis server is installed
  sudo_user: root
  apt: name=redis-server update_cache=yes state=installed
  tags: redis

- name: Switch to using upstart
  template: src=redis_conf.j2 dest="/etc/init/redis-server.conf" 
  tags: redis

- name: Append 'daemonizie=no' to config 
  lineinfile: >
    dest='/etc/redis/redis.conf'
    line='daemonize no'
    insertafter=EOF
    backup='yes'
  tags: redis

- name: Create log directory for celery
  file: path={{project_dir}}/celery
    owner={{remote_user}}
    group={{remote_user}}
    state=directory
  tags: celery

- name: Initialise log rotation for Celery logs
  sudo_user: root
  template: src=celery_log.j2
    dest='/etc/logrotate.d/application_name.log'
    owner={{remote_user}}
    group={{remote_user}}
  tags: celery

- name: Re-read the Supervisor config files
  sudo_user: root
  command: supervisorctl reread
  notify: restart webparticipation-celery
{'fraction_non_alphanumeric': 0.11124644742184328, 'fraction_numerical': 0.0036540803897685747, 'mean_word_length': 3.9181636726546905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '796709', 'n_tokens_mistral': 855, 'n_tokens_neox': 824, 'n_words': 208}