diff --git a/roles/phabricator/tasks/daemons.yml b/roles/phabricator/tasks/daemons.yml index 58cc8b1..e5e6b44 100644 --- a/roles/phabricator/tasks/daemons.yml +++ b/roles/phabricator/tasks/daemons.yml @@ -1,39 +1,39 @@ --- # Specialized daemons - name: Start Pull daemons for a group of repositories template: src: "{{ phd_pull }}" dest: /opt/pull-daemons.sh owner: "{{ phd_user }}" group: "{{ phd_user }}" mode: 0750 # Service - name: PHD systemd service for phabricator template: src: "{{ phd_init }}" dest: /usr/lib/systemd/system/phd.service mode: 0644 notify: reload systemctl - name: Start PHD service: name=phd state=started enabled=true -- name: Restart daemons for new repositories in cron - cron: - name: Restart daemons so new repo are picked up - hour: "0,4,8,12,16,20" - minute: 0 - job: systemctl restart phd +#- name: Restart daemons for new repositories in cron +# cron: +# name: Restart daemons so new repo are picked up +# hour: "0,4,8,12,16,20" +# minute: 0 +# job: systemctl restart phd # System - name: Configure OOM for php cron: name: Preferably kill php in OOM condition hour: 0 job: for p in $(/usr/bin/pgrep php); do /bin/echo 10 > /proc/$p/oom_adj; done diff --git a/roles/phabricator/templates/phd_init b/roles/phabricator/templates/phd_init index a8de5f6..12336f6 100644 --- a/roles/phabricator/templates/phd_init +++ b/roles/phabricator/templates/phd_init @@ -1,16 +1,14 @@ [Unit] Description=PHD Phabricator After=remote-fs.target [Service] Type=oneshot RemainAfterExit=true -ExecStart={{ phabricator_path }}phabricator/bin/phd launch 1 trigger -ExecStart={{ phabricator_path }}phabricator/bin/phd launch 5 task -ExecStart=/opt/pull-daemons.sh +ExecStart={{ phabricator_path }}phabricator/bin/phd start ExecStop={{ phabricator_path }}phabricator/bin/phd stop --gently --graceful 30 User={{ phd_user }} Group={{ phd_user }} [Install] WantedBy=multi-user.target