//TODOs: round robin sample? store in redis? only sample random with longer than x expiry?
//TODOs: round robin sample? store in redis? only sample random with longer than x expiry?
constrandomCaptcha=awaitCaptchas.randomSample();
constcaptchaSample=awaitCaptchas.randomSample();
id=randomCaptcha._id;
constrandomCaptcha=captchaSample[0];
captchaId=randomCaptcha._id;
maxAge=Math.abs((randomCaptcha.expireAt.getTime()+maxAge)-Date.now());//abs in case mongo hasn't pruned, and will not be too big since it can't be too far away from pruning anyway
maxAge=Math.abs((randomCaptcha.expireAt.getTime()+maxAge)-Date.now());//abs in case mongo hasn't pruned, and will not be too big since it can't be too far away from pruning anyway