Skip to content

Commit

Permalink
Merge pull request #3365 from zestedesavoir/update-watchdog
Browse files Browse the repository at this point in the history
[beta v16] Ajout des instructions pour le service lié aux watchdogs
  • Loading branch information
gustavi committed Feb 14, 2016
2 parents fed7a7a + bda6e87 commit 9c1e440
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions update.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,32 @@ ExecStart=/opt/zdsenv/bin/python /opt/zdsenv/ZesteDeSavoir/manage.py update_inde
Changer la politique de génération des documents #3080
------------------------------------------------------

Mettre à jour le paramètre ZDS_APP["content"]["extra_content_generation_policy"] à "WATCHDOG"
Lancer en parallèle du site le watchdog `python manage.py publication_watchdog &`.
Mettre à jour le paramètre ZDS_APP["content"]["extra_content_generation_policy"] à "WATCHDOG".

Créer un service `systemd` dans `/etc/systemd/system/zds-watchdog.service` avec:

```
[Unit]
Description=Zeste de Savoir - Watchdog
After=network.target
[Service]
User=zds
Group=zds
WorkingDirectory=/opt/zdsenv/ZesteDeSavoir
ExecStart=/opt/zdsenv/bin/python /opt/zdsenv/ZesteDeSavoir/manage.py publication_watchdog
ExecStop=/bin/kill -s TERM $MAINPID
[Install]
WantedBy=multi-user.target
```

Activer puis lancer le service (en root):

```sh
systemctl enable zds-watchdog.service
systemctl start zds-watchdog.service
```

Il est possible de configurer le logging de ce module en surchargeant les logger `logging.getLogger("zds.pandoc-publicator")`, `logging.getLogger("zds.watchdog-publicator")`.

0 comments on commit 9c1e440

Please sign in to comment.