Skip to content

Commit

Permalink
minor code refine
Browse files Browse the repository at this point in the history
  • Loading branch information
wjo1212 committed Dec 31, 2018
1 parent 90d4379 commit 454bade
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions aliyun/log/consumer/consumer_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from ..logexception import LogException
from ..version import USER_AGENT

logger = logging.getLogger(__name__)


class ConsumerClient(object):
def __init__(self, endpoint, access_key_id, access_key, project,
Expand Down
3 changes: 2 additions & 1 deletion aliyun/log/consumer/heart_beat.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def run(self):
try:
response_shards = []
last_heatbeat_time = time.time()

self.log_client.heartbeat(self.mheart_shards, response_shards)
logger.info('heart beat result: {} get: {}'.format(self.mheart_shards, response_shards))
logger.info('heart beat result: {0} get: {1}'.format(self.mheart_shards, response_shards))
self.mheld_shards = response_shards
self.mheart_shards = self.mheld_shards[:]

Expand Down

0 comments on commit 454bade

Please sign in to comment.