<commit_before>{% import 'project/_vars.sls' as vars with context %}

include:
  - supervisor.pip
  - project.dirs
  - project.venv
  - postfix

default_conf:
  file.managed:
    - name: /etc/supervisor/conf.d/{{ pillar['project_name'] }}-celery-default.conf
    - source: salt://project/worker/celery.conf
    - user: root
    - group: root
    - mode: 600
    - template: jinja
    - context:
        log_dir: "{{ vars.log_dir }}"
        settings: "{{ pillar['project_name'] }}.settings.deploy"
        virtualenv_root: "{{ vars.venv_dir }}"
        directory: "{{ vars.source_dir }}"
        name: "celery-default"
        command: "worker"
        flags: "--loglevel=INFO"
    - require:
      - pip: supervisor
      - file: log_dir
      - pip: pip_requirements
    - watch_in:
      - cmd: supervisor_update

default_process:
  supervisord.running:
    - name: {{ pillar['project_name'] }}-celery-default
    - restart: True
    - require:
      - file: default_conf<commit_msg>Add additional worker configuration<commit_after>{% import 'project/_vars.sls' as vars with context %}

include:
  - supervisor.pip
  - project.dirs
  - project.venv
  - postfix

default_conf:
  file.managed:
    - name: /etc/supervisor/conf.d/{{ pillar['project_name'] }}-celery-default.conf
    - source: salt://project/worker/celery.conf
    - user: root
    - group: root
    - mode: 600
    - template: jinja
    - context:
        log_dir: "{{ vars.log_dir }}"
        settings: "{{ pillar['project_name'] }}.settings.deploy"
        virtualenv_root: "{{ vars.venv_dir }}"
        directory: "{{ vars.source_dir }}"
        name: "celery-default"
        command: "worker"
        flags: "--loglevel=INFO --queue=celery --hostname=celery-default --concurrency=1"
    - require:
      - pip: supervisor
      - file: log_dir
      - pip: pip_requirements
    - watch_in:
      - cmd: supervisor_update

default_process:
  supervisord.running:
    - name: {{ pillar['project_name'] }}-celery-default
    - restart: True
    - require:
      - file: default_conf

org_scheduler_conf:
  file.managed:
    - name: /etc/supervisor/conf.d/{{ pillar['project_name'] }}-org-scheduler.conf
    - source: salt://project/worker/celery.conf
    - user: root
    - group: root
    - mode: 600
    - template: jinja
    - context:
        log_dir: "{{ vars.log_dir }}"
        settings: "{{ pillar['project_name'] }}.settings.deploy"
        virtualenv_root: "{{ vars.venv_dir }}"
        directory: "{{ vars.source_dir }}"
        name: "org-scheduler"
        command: "worker"
        flags: "--loglevel=INFO --queue=org_scheduler --hostname=org-scheduler --concurrency=1"
    - require:
      - pip: supervisor
      - file: log_dir
      - pip: pip_requirements
    - watch_in:
      - cmd: supervisor_update

org_scheduler_process:
  supervisord.running:
    - name: {{ pillar['project_name'] }}-org-scheduler
    - restart: True
    - require:
      - file: org_scheduler_conf


org_task_conf:
  file.managed:
    - name: /etc/supervisor/conf.d/{{ pillar['project_name'] }}-org-task.conf
    - source: salt://project/worker/celery.conf
    - user: root
    - group: root
    - mode: 600
    - template: jinja
    - context:
        log_dir: "{{ vars.log_dir }}"
        settings: "{{ pillar['project_name'] }}.settings.deploy"
        virtualenv_root: "{{ vars.venv_dir }}"
        directory: "{{ vars.source_dir }}"
        name: "org-task"
        command: "worker"
        flags: "--loglevel=INFO --queue=org_task --hostname=org-task --concurrency=1"
    - require:
      - pip: supervisor
      - file: log_dir
      - pip: pip_requirements
    - watch_in:
      - cmd: supervisor_update

org_task_process:
  supervisord.running:
    - name: {{ pillar['project_name'] }}-org-task
    - restart: True
    - require:
      - file: org_task_conf
{'fraction_non_alphanumeric': 0.14516971279373367, 'fraction_numerical': 0.0039164490861618795, 'mean_word_length': 2.363476733977173, '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': '3206404', 'n_tokens_mistral': 1304, 'n_tokens_neox': 1259, 'n_words': 243}