zephyr_mirror: Move stamp_path to not be based on root_path.
This commit is contained in:
parent
6395dc1a45
commit
7e5a320343
|
@ -233,9 +233,9 @@ def maybe_kill_child():
|
|||
|
||||
def maybe_restart_mirroring_script():
|
||||
# type: () -> None
|
||||
if os.stat(os.path.join(options.root_path, "stamps", "restart_stamp")).st_mtime > start_time or \
|
||||
if os.stat(os.path.join(options.stamp_path, "stamps", "restart_stamp")).st_mtime > start_time or \
|
||||
((options.user == "tabbott" or options.user == "tabbott/extra") and
|
||||
os.stat(os.path.join(options.root_path, "stamps", "tabbott_stamp")).st_mtime > start_time):
|
||||
os.stat(os.path.join(options.stamp_path, "stamps", "tabbott_stamp")).st_mtime > start_time):
|
||||
logger.warning("")
|
||||
logger.warning("zephyr mirroring script has been updated; restarting...")
|
||||
maybe_kill_child()
|
||||
|
@ -1031,6 +1031,9 @@ def parse_args():
|
|||
parser.add_option('--root-path',
|
||||
default="/afs/athena.mit.edu/user/t/a/tabbott/for_friends",
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
parser.add_option('--stamp-path',
|
||||
default="/afs/athena.mit.edu/user/t/a/tabbott/for_friends",
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
parser.add_option('--session-path',
|
||||
default=None,
|
||||
help=optparse.SUPPRESS_HELP)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[program:zmirror-USERNAME]
|
||||
command=/home/zulip/python-zulip-api/zulip/integrations/zephyr/zephyr_mirror_backend.py --user=USERNAME --log-path=/home/zulip/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/zulip/zephyr_sessions/%(program_name)s --api-key-file=/home/zulip/api-keys/%(program_name)s --ignore-expired-tickets --nagios-path=/home/zulip/mirror_status/%(program_name)s --nagios-class=zulip-mirror-nagios --site=https://zephyr.zulipchat.com
|
||||
command=/home/zulip/python-zulip-api/zulip/integrations/zephyr/zephyr_mirror_backend.py --stamp-path=/home/zulip/zulip --user=USERNAME --log-path=/home/zulip/logs/mirror-log-%(program_name)s --use-sessions --session-path=/home/zulip/zephyr_sessions/%(program_name)s --api-key-file=/home/zulip/api-keys/%(program_name)s --ignore-expired-tickets --nagios-path=/home/zulip/mirror_status/%(program_name)s --nagios-class=zulip-mirror-nagios --site=https://zephyr.zulipchat.com
|
||||
priority=200 ; the relative start priority (default 999)
|
||||
autostart=true ; start at supervisord start (default: true)
|
||||
autorestart=true ; whether/when to restart (default: unexpected)
|
||||
|
|
Loading…
Reference in a new issue