From 80830ec2fe703ed845340a3389a465e05f0209bf Mon Sep 17 00:00:00 2001 From: Avital Oliver Date: Tue, 28 May 2013 20:19:28 -0700 Subject: [PATCH] On 'meteor logs' from a galaxy, read from a separate log-reader app --- tools/deploy-galaxy.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/deploy-galaxy.js b/tools/deploy-galaxy.js index 11996b6cab..e2e27fd514 100644 --- a/tools/deploy-galaxy.js +++ b/tools/deploy-galaxy.js @@ -180,6 +180,11 @@ exports.deploy = function (options) { // - app exports.logs = function (options) { var galaxy = getGalaxy(options.context); + var logReaderURL = prettyCall(galaxy, "getLogReaderURL", [], { + 'no-log-reader': "Can't find log reader service" + }); + + var logReader = getMeteor().connect(logReaderURL); var Log = unipackage.load({ library: options.context.library, @@ -188,8 +193,7 @@ exports.logs = function (options) { }).logging.Log; var Collection = getMeteor().Collection; - var Logs = new Collection("logs", galaxy); - + var Logs = new Collection("logs", logReader); Logs.find().observe({ added: function(log) { var parsed = Log.parse(log.obj); @@ -200,10 +204,11 @@ exports.logs = function (options) { // XXX make this talk to a separate logReader service instead of // ultraworld direcly - prettySub(galaxy, "logsForApp", [options.app], { + prettySub(logReader, "logsForApp", [options.app], { "no-such-app": "No such app: " + options.app }); - // Close the connection to Galaxy (otherwise Node will continue running). + // Close connections to Galaxy and log-reader (otherwise Node will continue running). galaxy.close(); + logReader.close(); }; \ No newline at end of file