From 0906d6b906b910a8dfa4f893133469e39cadc103 Mon Sep 17 00:00:00 2001 From: Rahul Rudragoudar Date: Tue, 2 Mar 2021 21:34:38 +0530 Subject: [PATCH] Minor updates Signed-off-by: Rahul Rudragoudar --- src/main/scala/lc/background/taskThread.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/lc/background/taskThread.scala b/src/main/scala/lc/background/taskThread.scala index fe3cbbc..e48276a 100644 --- a/src/main/scala/lc/background/taskThread.scala +++ b/src/main/scala/lc/background/taskThread.scala @@ -5,7 +5,7 @@ import java.util.concurrent.{ScheduledThreadPoolExecutor, TimeUnit} import lc.core.Captcha import lc.core.{Parameters, Size} -class BackgroundTask(captcha: Captcha, throttle: Int) { +class BackgroundTask(captcha: Captcha, throttle: Int, timeLimit: Int) { private val task = new Runnable { def run(): Unit = { @@ -22,7 +22,7 @@ class BackgroundTask(captcha: Captcha, throttle: Int) { if (imageNum.next()) throttleIn = (throttleIn - imageNum.getInt("total")) while (0 < throttleIn) { - captcha.generateChallenge(Parameters("", "", "", Option(Size(0, 0)))) + captcha.generateChallenge(Parameters("medium", "image/png", "text", Option(Size(0, 0)))) throttleIn -= 1 } } catch { case e: Exception => println(e) }