retention: Add a daily cron job.

This will run archive_messages management command at 6am every day, 1
hour after soft_deactivate_users (which runs at 5am).
This commit is contained in:
Mateusz Mandera 2020-05-04 14:15:33 +02:00 committed by Tim Abbott
parent b9098a42d4
commit 4643e48f60
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,7 @@
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
USER=zulip
# Daily cron job for retention policy - archives existing messages based on the policy
# and cleans expired entries from the archive.
0 6 * * * zulip /home/zulip/deployments/current/manage.py archive_messages >/dev/null

View File

@ -34,6 +34,14 @@ class zulip::app_frontend_once {
source => 'puppet:///modules/zulip/cron.d/soft-deactivate-users', source => 'puppet:///modules/zulip/cron.d/soft-deactivate-users',
} }
file { '/etc/cron.d/archive-messages':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => 'puppet:///modules/zulip/cron.d/archive-messages',
}
file { '/etc/cron.d/calculate-first-visible-message-id': file { '/etc/cron.d/calculate-first-visible-message-id':
ensure => absent, ensure => absent,
} }