8000 Log and continue on socket error · devopstiger/client_python@93654f3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 93654f3

Browse files
committed
Log and continue on socket error
1 parent 23fae34 commit 93654f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

prometheus_client/bridge/graphite.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/python
22
from __future__ import unicode_literals
33

4+
import logging
45
import re
56
import socket
67
import time
@@ -35,7 +36,10 @@ def run(self):
3536
break
3637
# time.sleep can return early.
3738
time.sleep(wait_until - now)
38-
self._pusher.push()
39+
try:
40+
self._pusher.push()
41+
except IOError as e:
42+
logging.exception("Push failed")
3943

4044

4145
class GraphiteBridge(object):

0 commit comments

Comments
 (0)
0