Skip to content

Commit

Permalink
handle exception when push request
Browse files Browse the repository at this point in the history
  • Loading branch information
jadbin committed Nov 25, 2016
1 parent 105ff94 commit a4463b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion xpaw/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,10 @@ def from_config(cls, config):
def push_request(self, topic, req):
log.debug("Push request (url={0}) into the topic '{1}'".format(req.url, topic))
r = pickle.dumps(req)
self._producer.send(topic, r)
try:
self._producer.send(topic, r)
except Exception:
log.warning("Unexpected error occurred when push request", exc_info=True)


class HeartbeatSender:
Expand Down
2 changes: 1 addition & 1 deletion xpaw/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# coding=utf-8

__version__ = "0.5.5a11"
__version__ = "0.5.5a12"

0 comments on commit a4463b7

Please sign in to comment.