check_send_receive_time: Use machine.deploy_type to check "staging".

This brings it in line with other locations (e.g. Sentry) and is less
likely to have accidental false-positives.
This commit is contained in:
Alex Vandiver 2024-05-08 18:34:57 +00:00 committed by Tim Abbott
parent 8bdf1e4a10
commit f42153f670
1 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ from django.conf import settings
from zerver.models.realms import get_realm
from zerver.models.users import get_system_bot
from zproject.config import get_config
usage = """Usage: send-receive.py [options] [config]
@ -88,7 +89,7 @@ def get_zulips() -> List[Dict[str, Any]]:
internal_realm_id = get_realm(settings.SYSTEM_BOT_REALM).id
if (
"staging" in options.site
get_config("machine", "deploy_type") == "staging"
and settings.NAGIOS_STAGING_SEND_BOT is not None
and settings.NAGIOS_STAGING_RECEIVE_BOT is not None
):