Skip to content

Commit

Permalink
Add trace
Browse files Browse the repository at this point in the history
  • Loading branch information
pierrebruninmaif committed Mar 21, 2023
1 parent 46e187f commit c65550a
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import io.reactivex.Single
import io.vertx.core.json.JsonObject
import io.vertx.kotlin.core.json.json
import io.vertx.kotlin.core.json.obj
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
import java.util.concurrent.ConcurrentHashMap
Expand Down Expand Up @@ -76,6 +78,10 @@ class AllDomainView(

private val datas = ConcurrentHashMap<String, DomainResume>()

companion object {
private val LOGGER: Logger = LoggerFactory.getLogger(AllDomainView::class.java)
}

private fun update(domain: String, mayBeSubdomain: Option<String>, f: (CertificateDomainResume) -> CertificateDomainResume) {
val domainResume = datas.getOrPut(domain){ DomainResume(domain) }
domainResume.updateCertificate(mayBeSubdomain, f)
Expand Down Expand Up @@ -124,7 +130,12 @@ class AllDomainView(
val (domain, subdomain) = event
datas[domain].toOption().toList().forEach { it.deleteCertificate(subdomain) }
}
else -> throw IllegalStateException("Unknown event type")
is CertificateReOrderedStarted -> {
LOGGER.info("Scheduler CertificateRenewer started")
}
else -> {
LOGGER.warn("Unmanaged event: ${event.type()}")
}
}
}
}
Expand Down

0 comments on commit c65550a

Please sign in to comment.