mirror of
https://github.com/zulip/zulip.git
synced 2026-06-27 21:01:32 +08:00
mirror_to_czo: Restart on new deploys.
This commit is contained in:
parent
0d87b77279
commit
a85deecc89
@ -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:*
|
||||
@ -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()
|
||||
|
||||
@ -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': }
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user