1
0
mirror of synced 2025-12-17 18:48:09 +08:00

auto commit

This commit is contained in:
yitter
2021-08-31 11:52:53 +08:00
parent 2308932d25
commit c669af4cbe
8 changed files with 37 additions and 37 deletions

21
JavaScript/test/test.js Normal file
View File

@@ -0,0 +1,21 @@
/**
* @description:
* @author: bubao
* @date: 2021-04-27 17:23:36
* @last author: bubao
* @last edit time: 2021-04-28 10:34:24
*/
const GenId = require('..')
const Redis = require("ioredis");
const config = require("../env.config.js");
const redis = new Redis(config);
const genid = new GenId({ WorkerId: (process.argv[2] || 1) - 0 });
(async () => {
for (let index = 0; index < 5000; index++) {
await redis.sadd("setTest", genid.NextId());
}
redis.end();
})();