mirror of
				https://github.com/zulip/zulip.git
				synced 2025-10-31 20:13:46 +00:00 
			
		
		
		
	tornado: Reduce logging of event queue load/dump.
This logging is really only potentially interesting in a development environment when the numbers are nonzero. In production, it seems worth logging for consistency reasons. Probably we'll eventually redo this block by change the log level, but this is good enough to despam the development environment startup output.
This commit is contained in:
		| @@ -471,8 +471,9 @@ def dump_event_queues(port: int) -> None: | ||||
|             orjson.dumps([(qid, client.to_dict()) for (qid, client) in clients.items()]) | ||||
|         ) | ||||
|  | ||||
|     logging.info('Tornado %d dumped %d event queues in %.3fs', | ||||
|                  port, len(clients), time.time() - start) | ||||
|     if len(clients) > 0 or settings.PRODUCTION: | ||||
|         logging.info('Tornado %d dumped %d event queues in %.3fs', | ||||
|                      port, len(clients), time.time() - start) | ||||
|  | ||||
| def load_event_queues(port: int) -> None: | ||||
|     global clients | ||||
| @@ -498,8 +499,9 @@ def load_event_queues(port: int) -> None: | ||||
|  | ||||
|         add_to_client_dicts(client) | ||||
|  | ||||
|     logging.info('Tornado %d loaded %d event queues in %.3fs', | ||||
|                  port, len(clients), time.time() - start) | ||||
|     if len(clients) > 0 or settings.PRODUCTION: | ||||
|         logging.info('Tornado %d loaded %d event queues in %.3fs', | ||||
|                      port, len(clients), time.time() - start) | ||||
|  | ||||
| def send_restart_events(immediate: bool=False) -> None: | ||||
|     event: Dict[str, Any] = dict(type='restart', server_generation=settings.SERVER_GENERATION) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user