Skip to content

Commit

Permalink
Removed extra function create. Minor fix to progress reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
InconceivableDuck committed Aug 16, 2013
1 parent e4d3b3e commit 3f90334
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lib/controllers/project.js
Expand Up @@ -156,6 +156,13 @@ Project.prototype.deploy = function(projectId, file, callback) {
client.upload(projectId, file);

client.on('progress', function(progress) {

// The progress bar UI starts at 1. This keeps it from jumping
// to zero, then back to 1.
if(progress < 0.01) {
progress = 0.01;
}

if (process.stdout.isTTY) { ubar.tick((progress * 100) - ubar.curr); }
});

Expand Down
4 changes: 2 additions & 2 deletions lib/controllers/uploader.js
Expand Up @@ -101,12 +101,12 @@ Uploader.prototype.monitorProgress = function(projectId) {

// Wait a second and get status again.
if(self.uploading) {
setTimeout(function() { getStatus(); }, 1000);
setTimeout(getStatus, 1000);
}
});
};

setTimeout(function() { getStatus(); }, 1000);
setTimeout(getStatus, 1000);
};

module.exports = Uploader;

0 comments on commit 3f90334

Please sign in to comment.