mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-27 21:46:04 +02:00
19 lines
581 B
Scala
19 lines
581 B
Scala
![]() |
package com.twitter.home_mixer
|
||
|
|
||
|
import com.twitter.finatra.http.routing.HttpWarmup
|
||
|
import com.twitter.finatra.httpclient.RequestBuilder._
|
||
|
import com.twitter.inject.Logging
|
||
|
import com.twitter.inject.utils.Handler
|
||
|
import com.twitter.util.Try
|
||
|
import javax.inject.Inject
|
||
|
import javax.inject.Singleton
|
||
|
|
||
|
@Singleton
|
||
|
class HomeMixerHttpServerWarmupHandler @Inject() (warmup: HttpWarmup) extends Handler with Logging {
|
||
|
|
||
|
override def handle(): Unit = {
|
||
|
Try(warmup.send(get("/admin/product-mixer/product-pipelines"), admin = true)())
|
||
|
.onFailure(e => error(e.getMessage, e))
|
||
|
}
|
||
|
}
|