-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
32 lines (31 loc) · 902 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// const Migrate = require('./lib/migrate.js');
// const AutoScale = require('./lib/autoScale.js');
// const migrate = new Migrate();
// migrate.deletePod('default','nginx-deployment-6fcbf57d97-bzgl9');
// migrate.deleteNode('titan2');
// const autoScale = new AutoScale();
const sleep = function (t) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve();
}, t);
});
}
async function main(t,name){
// let result = await autoScale.shutDownNode('192.168.2.95');
// console.log(result);
// await autoScale.openNode('a0:48:1c:a0:6e:94');
// await autoScale.addNodeToCluster('titan2');
console.log(name);
await sleep(t);
}
async function test(){
await main(3000,'test1');
await main(10000,'test2');
}
async function test1(){
await test();
await test1();
}
test1();
Promise.all([test1(),test1(),test1(),test1()])