Skip to content

Commit

Permalink
tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ekatek authored and Naomi Seyfer committed Dec 13, 2013
1 parent 2760346 commit 4ab6f8e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
27 changes: 25 additions & 2 deletions packages/application-configuration/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ AppConfig.findGalaxy = _.once(function () {
var ultra = AppConfig.findGalaxy();

var subFuture = new Future();
if (ultra)
var subFutureJobs = new Future();
if (ultra) {
ultra.subscribe("oneApp", process.env.GALAXY_APP, subFuture.resolver());
ultra.subscribe("oneJob", process.env.GALAXY_APP, subFutureJobs.resolver());
}

var OneAppApps;
var Services;
var collectionFuture = new Future();
Expand All @@ -24,6 +28,9 @@ Meteor.startup(function () {
OneAppApps = new Meteor.Collection("apps", {
connection: ultra
});
OneAppJobs = new Meteor.Collection("jobs", {
connection: ultra
});
Services = new Meteor.Collection('services', {
connection: ultra
});
Expand All @@ -39,6 +46,12 @@ AppConfig._getAppCollection = function () {
return OneAppApps;
};

AppConfig._getJobsCollection = function () {
collectionFuture.wait();
return OneAppJobs;
};


var staticAppConfig;

try {
Expand Down Expand Up @@ -81,6 +94,17 @@ AppConfig.getAppConfig = function () {
return config;
};

AppConfig.getStarForThisJob = function () {
if (ultra) {
subFutureJobs.wait();
var job = OneAppJobs.findOne(process.env.GALAXY_JOB);
if (job) {
return job.star;
}
}
return "";
};

AppConfig.configurePackage = function (packageName, configure) {
var appConfig = AppConfig.getAppConfig(); // Will either be based in the env var,
// or wait for galaxy to connect.
Expand Down Expand Up @@ -124,7 +148,6 @@ AppConfig.configurePackage = function (packageName, configure) {
};
};


AppConfig.configureService = function (serviceName, configure) {
if (ultra) {
// there's a Meteor.startup() that produces the various collections, make
Expand Down
8 changes: 6 additions & 2 deletions packages/webapp/webapp_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,12 @@ WebAppInternals.bindToProxy = function (proxyConfig, proxyServiceName) {
};
};

var version = (proxyConfig.version) ? proxyConfig.version : "";

var version = "";
var adminPrograms = ["panel", "ultraworld", "proxy"];
if (!_.contains(adminPrograms, bindPathPrefix)) {
var AppConfig = Package["application-configuration"].AppConfig;
version = AppConfig.getStarForThisJob();
}
proxy.call('bindDdp', {
pid: pid,
bindTo: ddpBindTo,
Expand Down
1 change: 0 additions & 1 deletion tools/deploy-galaxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@ exports.deploy = function (options) {
// fails (we already know the app exists.)
var info = prettyCall(galaxy, 'beginUploadStar', [options.app, bundleResult.starManifest]);

console.log("StarId: ", info.id);
// Upload
// XXX copied from galaxy/tool/galaxy.js
var fileSize = fs.statSync(starball).size;
Expand Down

0 comments on commit 4ab6f8e

Please sign in to comment.