puppet: Add a daily cron job to re-sync subscriber counts.

Default installs will re-examine every stream, since the process is
relatively fast.  Large installs have the option to only examine
streams which have the potential to have changed subscriber counts.
This commit is contained in:
Alex Vandiver
2025-09-05 19:30:38 +00:00
committed by Tim Abbott
parent f915498e48
commit 94a0f02acc

View File

@@ -55,6 +55,20 @@ class zulip::app_frontend_once {
minute => '0',
manage => 'enqueue_digest_emails',
}
# Most deploys will re-run this for all streams, daily; large
# deploys may set this to a number >= 25 to only update streams with
# recent potential changes.
$update_subscriber_count_incremental = zulipconf('application_server', 'update_subscriber_count_incremental', '')
if $update_subscriber_count_incremental != '' {
$update_subscriber_count_arg = " --since ${update_subscriber_count_incremental}"
} else {
$update_subscriber_count_arg = ''
}
zulip::cron { 'update_subscriber_counts':
hour => '6',
minute => '0',
manage => "update_subscriber_counts${update_subscriber_count_arg}"
}
zulip::cron { 'clearsessions':
hour => '22',
minute => '22',