renamed Captcha to CaptchaManager

Signed-off-by: hrj <harshad.rj@gmail.com>
This commit is contained in:
hrj
2022-02-24 20:11:00 +05:30
parent 497b88f0d3
commit 52b071d680
4 changed files with 13 additions and 13 deletions

View File

@@ -2,11 +2,11 @@ package lc.background
import lc.database.Statements
import java.util.concurrent.{ScheduledThreadPoolExecutor, TimeUnit}
import lc.core.{Captcha, Config}
import lc.core.{CaptchaManager, Config}
import lc.core.{Parameters, Size}
import lc.misc.HelperFunctions
class BackgroundTask(config: Config, captcha: Captcha) {
class BackgroundTask(config: Config, captchaManager: CaptchaManager) {
private val task = new Runnable {
def run(): Unit = {
@@ -28,7 +28,7 @@ class BackgroundTask(config: Config, captcha: Captcha) {
val throttle = (config.throttle * 1.1).toInt - imageNum
for (i <- 0 until throttle) {
captcha.generateChallenge(getRandomParam())
captchaManager.generateChallenge(getRandomParam())
}
} catch { case exception: Exception => println(exception) }
}