From c31f21dbba9964d6051203c90c7fb3f01635bfb0 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Thu, 12 Sep 2019 15:57:53 +0800 Subject: [PATCH] fix(parser): fix default dump interval to 5 --- gnes/service/base.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gnes/service/base.py b/gnes/service/base.py index 89a1674e..431100ed 100644 --- a/gnes/service/base.py +++ b/gnes/service/base.py @@ -317,9 +317,7 @@ def _auto_dump(self): self.logger.info( 'auto-dumping the new change of the model every %ds...' % self.args.dump_interval) self.dump() - time.sleep(self.args.dump_interval) - else: - time.sleep(1) + time.sleep(self.args.dump_interval) def dump(self): if not self.args.read_only: @@ -334,7 +332,7 @@ def dump(self): def _hook_warn_body_type_change(self, msg: 'gnes_pb2.Message', *args, **kwargs): new_type = msg.WhichOneof('body') if new_type != self._msg_old_type: - self.logger.warning('message body type has changed from %s to %s' % (self._msg_old_type, new_type)) + self.logger.warning('message body type has changed from "%s" to "%s"' % (self._msg_old_type, new_type)) @handler.register_hook(hook_type='post') def _hook_sort_response(self, msg: 'gnes_pb2.Message', *args, **kwargs):