Skip to content

Commit

Permalink
Do not use log.info() to log purge messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blad3Mak3r committed Mar 24, 2022
1 parent fff1010 commit 4eb1543
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ plugins {
}

group = "tv.blademaker"
val versionObj = Version(0, 7, 3)
val versionObj = Version(0, 7, 4)
version = versionObj.toString()

val jdaVersion = "5.0.0-alpha.9"
val coroutinesVersion = "1.6.0"
val slf4jApi = "1.7.36"
val prometheusVersion = "0.15.0"
val reflectionsVersion = "0.10.2"
val sentryVersion = "5.6.0"
val sentryVersion = "5.6.2"

repositories {
mavenCentral()
Expand All @@ -41,7 +41,7 @@ dependencies {
api("io.prometheus:simpleclient:$prometheusVersion")

testImplementation("junit:junit:4.13.2")
testImplementation("ch.qos.logback:logback-classic:1.2.10")
testImplementation("ch.qos.logback:logback-classic:1.2.11")
}

val dokkaOutputDir = "$buildDir/dokka"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ class RateLimitHandler(configuration: Configuration) {
}

private fun purgeExpired() = Runnable {
log.info("Purging expired RateLimit Buckets...")
if (registry.isEmpty()) return@Runnable
log.debug("Purging expired RateLimit Buckets...")
var count = 0
val now = System.currentTimeMillis()
for (bucket in registry) {
Expand All @@ -63,7 +64,7 @@ class RateLimitHandler(configuration: Configuration) {
count++
}
}
log.info("Purge task done with a total of $count buckets expired.")
log.debug("Purge task done with a total of $count buckets expired.")
}

private fun createKey(annotation: RateLimit, event: SlashCommandInteractionEvent): String {
Expand Down

0 comments on commit 4eb1543

Please sign in to comment.