Last active
August 29, 2015 14:05
-
-
Save rhelmer/4aa2110086c8808970bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/l10ninsp/steps.py b/l10ninsp/steps.py | |
index ce2b011..c5981ce 100644 | |
--- a/l10ninsp/steps.py | |
+++ b/l10ninsp/steps.py | |
@@ -24,6 +24,7 @@ from cStringIO import StringIO | |
from bb2mbdb.utils import timeHelper | |
import logger, util | |
+import elasticsearch | |
class ResultRemoteCommand(LoggedRemoteCommand): | |
""" | |
@@ -133,6 +134,14 @@ class ResultRemoteCommand(LoggedRemoteCommand): | |
if k in summary]) | |
self.logs['stdio'].addEntry(5, json.dumps(result, indent=2)) | |
self.addSummary(summary) | |
+ # TODO where to put settings? | |
+ ES_COMPARE_HOST = 'localhost:9200/' | |
+ ES_COMPARE_INDEX = 'elmo-comparisons' | |
+ es = elasticsearch.Elasticsearch(hosts=ES_COMPARE_HOST) | |
+ # TODO auto id OK here? | |
+ es.index(index=ES_COMPARE_INDEX, body=json.dumps(result), | |
+ doc_type='comparison') | |
+ logger.debug('remoteUpdate', | |
+ 'inserted into Elasticsearch') | |
def addStats(self, stats): | |
self.ensureDBRun() |
master-ball has a local.py for configuration
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can't use auto-id, needs to match the run database object