def handle_iopub_msg(msg):
if msg["msg_type"] == "status":
if msg["content"]["execution_state"] == "idle":
parent_id = msg["parent_header"]["msg_id"]
try:
status_msg_cache[parent_id].callback(True)
except AlreadyCalledError:
pass
reactor.callLater(1.0, clean_cache, status_msg_cache, key=parent_id)
if "idle" in status_msg_cache:
if not status_msg_cache["idle"].called:
status_msg_cache["idle"].callback(True)
评论列表
文章目录