javascript lint cleanup
This commit is contained in:
		
							parent
							
								
									09052c0f80
								
							
						
					
					
						commit
						0d53e878e9
					
				| @ -30,4 +30,4 @@ function createDistraction() { | |||||||
| 
 | 
 | ||||||
| module.exports = { | module.exports = { | ||||||
|     createDistraction: createDistraction |     createDistraction: createDistraction | ||||||
| } | }; | ||||||
|  | |||||||
| @ -4,10 +4,8 @@ | |||||||
|  * `triton wait-instance ...` |  * `triton wait-instance ...` | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| var format = require('util').format; |  | ||||||
| var vasync = require('vasync'); | var vasync = require('vasync'); | ||||||
| 
 | 
 | ||||||
| var common = require('./common'); |  | ||||||
| var distractions = require('./distractions'); | var distractions = require('./distractions'); | ||||||
| var errors = require('./errors'); | var errors = require('./errors'); | ||||||
| 
 | 
 | ||||||
| @ -46,7 +44,7 @@ function do_wait_instance(subcmd, opts, args, cb) { | |||||||
|                         } |                         } | ||||||
|                         nextInst(); |                         nextInst(); | ||||||
|                     }); |                     }); | ||||||
|                 }, |                 } | ||||||
|             }, next); |             }, next); | ||||||
|         }, |         }, | ||||||
| 
 | 
 | ||||||
| @ -67,7 +65,6 @@ function do_wait_instance(subcmd, opts, args, cb) { | |||||||
|                     idsToWaitFor.length, states.join(', ')); |                     idsToWaitFor.length, states.join(', ')); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             var distraction; |  | ||||||
|             if (false /* TODO: need BigSpinner.log first */ |             if (false /* TODO: need BigSpinner.log first */ | ||||||
|                 && !opts.quiet && process.stderr.isTTY) |                 && !opts.quiet && process.stderr.isTTY) | ||||||
|             { |             { | ||||||
| @ -98,40 +95,6 @@ function do_wait_instance(subcmd, opts, args, cb) { | |||||||
|         } |         } | ||||||
|         cb(err); |         cb(err); | ||||||
|     }); |     }); | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|     function go1() { |  | ||||||
|         if (--i > 0) |  | ||||||
|             return; |  | ||||||
| 
 |  | ||||||
|         var uuids = Object.keys(machines); |  | ||||||
|         var num = uuids.length; |  | ||||||
|         i = num; |  | ||||||
| 
 |  | ||||||
|         if (num === 0) { |  | ||||||
|             cb(); |  | ||||||
|             return; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         uuids.forEach(function (id) { |  | ||||||
|             var waitOpts = { |  | ||||||
|                 id: id, |  | ||||||
|                 states: states |  | ||||||
|             }; |  | ||||||
|             self.triton.cloudapi.waitForMachineStates(waitOpts, |  | ||||||
|                     function (err, body, res) { |  | ||||||
|                 if (err) { |  | ||||||
|                     cb(err); |  | ||||||
|                     return; |  | ||||||
|                 } |  | ||||||
|                 log('%d/%d: %s moved to state %s', |  | ||||||
|                     ++done, ids.length, body.name, body.state); |  | ||||||
|                 if (--i === 0) { |  | ||||||
|                     cb(); |  | ||||||
|                 } |  | ||||||
|             }); |  | ||||||
|         }); |  | ||||||
|     } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| do_wait_instance.aliases = ['wait']; | do_wait_instance.aliases = ['wait']; | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user