mirror of https://github.com/zulip/zulip.git
check_send_receive_time: Move "states" to inside where they are used.
This commit is contained in:
parent
04e21044b9
commit
8bdf1e4a10
|
@ -45,6 +45,8 @@ parser.add_argument("--insecure", action="store_true")
|
||||||
|
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
def report(state: str, timestamp: Any = None, msg: Optional[str] = None) -> NoReturn:
|
||||||
states = {
|
states = {
|
||||||
"OK": 0,
|
"OK": 0,
|
||||||
"WARNING": 1,
|
"WARNING": 1,
|
||||||
|
@ -52,8 +54,6 @@ states = {
|
||||||
"UNKNOWN": 3,
|
"UNKNOWN": 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def report(state: str, timestamp: Any = None, msg: Optional[str] = None) -> NoReturn:
|
|
||||||
now = int(time.time())
|
now = int(time.time())
|
||||||
if msg is None:
|
if msg is None:
|
||||||
msg = f"send time was {timestamp}"
|
msg = f"send time was {timestamp}"
|
||||||
|
|
Loading…
Reference in New Issue