Skip to contentSkip to conversation

oestats-client: only send report when task has failed

PATCH Superseded Eric Bénard 1 participant 1 message Feb 18, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oestats-client: only send report when task has failed

actual behaviour is to send a report for *each* task runned by bitbake this is ok for one personnal oestat server but doesn't scale well when dozen of peoples are running test builders which all send reports to the OE's infrastructure.

---
 classes/oestats-client.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
classes/oestats-client.bbclass +1 -1
index 4233d4a..b568442 100644
@@ -172,8 +172,8 @@ def oestats_task(server, d, task, status):
 	# send report
 	# FIXME: resend on http/url error?
 	try:
-		response = oestats_send(d, server, "/tasks/", vars, files)
 		if status == 'Failed':
+			response = oestats_send(d, server, "/tasks/", vars, files)
 			bb.warn("oestats: task failed, see %s%s" % (server, response))
 	except:
 		bb.warn("oestats: error sending task (%s), disabling stats" % get_exc_info())
Signature · 1 line
1.7.0.4