mirror_to_czo: Restart on new deploys.

This commit is contained in:
Alex Vandiver 2025-11-20 14:32:15 -05:00 committed by Tim Abbott
parent 0d87b77279
commit a85deecc89
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
set -u
# This script uses `uv run`, and thus uses the production venv. This
# means that we need to make sure that we restart into the new venv,
# so we don't start to error when the old venv gets garbage collected.
supervisorctl restart mirror_to_czo:*

View File

@ -6,6 +6,8 @@ import time
from contextlib import suppress
from typing import Any
# This import (and its dependencies) come from the production venv,
# because we use `uv run` to execute this script.
import zulip
config_file = configparser.RawConfigParser()

View File

@ -1,4 +1,5 @@
class kandra::mirror_to_czo {
include zulip::hooks::base
include zulip::supervisor
# We embed the hash of the contents into the name of the process, so
@ -28,4 +29,6 @@ class kandra::mirror_to_czo {
content => template('kandra/supervisor/conf.d/mirror_to_czo.conf.template.erb'),
notify => Service[supervisor],
}
kandra::hooks::file { 'post-deploy.d/restart_mirror_to_czo.hook': }
}