Merge lp:~hloeung/ubuntu-repository-cache/add-send-to-influx-socket-timeout into lp:ubuntu-repository-cache

Proposed by Haw Loeung
Status: Merged
Approved by: Haw Loeung
Approved revision: 319
Merged at revision: 319
Proposed branch: lp:~hloeung/ubuntu-repository-cache/add-send-to-influx-socket-timeout
Merge into: lp:ubuntu-repository-cache
Diff against target: 11 lines (+1/-0)
1 file modified
files/health_check.py (+1/-0)
To merge this branch: bzr merge lp:~hloeung/ubuntu-repository-cache/add-send-to-influx-socket-timeout
Reviewer Review Type Date Requested Status
Paul Collins lgtm Approve
Canonical IS Reviewers Pending
Review via email: mp+398931@code.launchpad.net

Commit message

Add socket timeout for sending metrics to influx

To post a comment you must log in.
Revision history for this message
Paul Collins (pjdc) :
review: Approve (lgtm)
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Haw Loeung (hloeung) :
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 319

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'files/health_check.py'
--- files/health_check.py 2021-02-16 23:48:45 +0000
+++ files/health_check.py 2021-03-02 01:41:05 +0000
@@ -48,6 +48,7 @@
48 port = int(port)48 port = int(port)
49 try:49 try:
50 s = socket.socket()50 s = socket.socket()
51 s.settimeout(2)
51 s.connect((host, port))52 s.connect((host, port))
52 with s.makefile(mode='w') as dest:53 with s.makefile(mode='w') as dest:
53 dest.write(metrics)54 dest.write(metrics)

Subscribers

People subscribed via source and target branches