mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1222549 - Don't give up logging any stats when failing to submit to influxdb. r=jlund
Metrics submission in mozharness fails gracefully if there's a problem, but it fails too early now that we're logging perherder data. This moves the guard against repeatedly failing to submit to influx so that we will log PERFHERDER_DATA even when influxdb submission fails. --HG-- extra : commitid : 8QYBTLrwK4f
This commit is contained in:
parent
e83b2d5475
commit
8ecd2e0185
@ -698,8 +698,6 @@ class InfluxRecordingMixin(object):
|
||||
|
||||
@PostScriptAction('build')
|
||||
def record_mach_stats(self, action, success=None):
|
||||
if not self.recording:
|
||||
return
|
||||
if not os.path.exists(self.res_props):
|
||||
self.info('No build_resources.json found, not logging stats')
|
||||
return
|
||||
@ -762,6 +760,8 @@ class InfluxRecordingMixin(object):
|
||||
self.record_influx_stat([data])
|
||||
|
||||
def record_influx_stat(self, json_data):
|
||||
if not self.recording:
|
||||
return
|
||||
try:
|
||||
r = self.post(self.posturl, data=json.dumps(json_data), timeout=5)
|
||||
if r.status_code != 200:
|
||||
|
Loading…
Reference in New Issue
Block a user