Skip to content

Commit

Permalink
[minor] enable a redeploy in other datacenter of a snapshot already d…
Browse files Browse the repository at this point in the history
…eployed
  • Loading branch information
cronopio committed Feb 6, 2013
1 parent ccbe887 commit 0dc2eef
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions lib/jitsu/commands/apps.js
Expand Up @@ -844,13 +844,30 @@ apps.cloud = function (name, provider, datacenter, drones) {
}

function setCloud() {
var cloudOpts;
if (!name) {
return readApp(setCloud);
}

//
// TODO: Implement this!!!
//
if (drones && typeof drones !== 'function') {
cloudOpts.drones = drones;
}

if (typeof datacenter !== 'string') {
jitsu.log.error('You need to set a datacenter name');
return callback({});
} else {
cloudOpts.datacenter = datacenter;
}

cloudOpts.provider = provider;

jitsu.apps.datacenter(name, cloudOpts, function (err) {
if (err) {
return callback(err);
}
return callback();
});
}

function readApp(next) {
Expand Down

0 comments on commit 0dc2eef

Please sign in to comment.