mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-02 17:28:45 +02:00
ef4c5eb65e
Please note we have force-pushed a new initial commit in order to remove some publicly-available Twitter user information. Note that this process may be required in the future.
19 lines
572 B
Scala
19 lines
572 B
Scala
package com.twitter.cr_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 CrMixerHttpServerWarmupHandler @Inject() (warmup: HttpWarmup) extends Handler with Logging {
|
|
|
|
override def handle(): Unit = {
|
|
Try(warmup.send(get("/admin/cr-mixer/product-pipelines"), admin = true)())
|
|
.onFailure(e => error(e.getMessage, e))
|
|
}
|
|
}
|