mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 12:03:46 +00:00 
			
		
		
		
	check_send_receive_time: Move "states" to inside where they are used.
This commit is contained in:
		
				
					committed by
					
						 Tim Abbott
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							04e21044b9
						
					
				
				
					commit
					8bdf1e4a10
				
			| @@ -45,15 +45,15 @@ parser.add_argument("--insecure", action="store_true") | ||||
|  | ||||
| options = parser.parse_args() | ||||
|  | ||||
| states = { | ||||
|     "OK": 0, | ||||
|     "WARNING": 1, | ||||
|     "CRITICAL": 2, | ||||
|     "UNKNOWN": 3, | ||||
| } | ||||
|  | ||||
|  | ||||
| def report(state: str, timestamp: Any = None, msg: Optional[str] = None) -> NoReturn: | ||||
|     states = { | ||||
|         "OK": 0, | ||||
|         "WARNING": 1, | ||||
|         "CRITICAL": 2, | ||||
|         "UNKNOWN": 3, | ||||
|     } | ||||
|  | ||||
|     now = int(time.time()) | ||||
|     if msg is None: | ||||
|         msg = f"send time was {timestamp}" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user