You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- /**
- * @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();
- })();
|