mirror of
https://github.com/twitter/the-algorithm.git
synced 2024-06-28 05:56:04 +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.
24 lines
935 B
Scala
24 lines
935 B
Scala
package com.twitter.home_mixer.module
|
|
|
|
import com.google.inject.Provides
|
|
import com.twitter.finagle.stats.StatsReceiver
|
|
import com.twitter.home_mixer.param.HomeMixerInjectionNames.BatchedStratoClientWithModerateTimeout
|
|
import com.twitter.inject.TwitterModule
|
|
import com.twitter.strato.client.Client
|
|
import com.twitter.timelines.clients.strato.twistly.SimClustersRecentEngagementSimilarityClient
|
|
import com.twitter.timelines.clients.strato.twistly.SimClustersRecentEngagementSimilarityClientImpl
|
|
import javax.inject.Named
|
|
import javax.inject.Singleton
|
|
|
|
object SimClustersRecentEngagementsClientModule extends TwitterModule {
|
|
@Singleton
|
|
@Provides
|
|
def providesSimilarityClient(
|
|
@Named(BatchedStratoClientWithModerateTimeout)
|
|
stratoClient: Client,
|
|
statsReceiver: StatsReceiver
|
|
): SimClustersRecentEngagementSimilarityClient = {
|
|
new SimClustersRecentEngagementSimilarityClientImpl(stratoClient, statsReceiver)
|
|
}
|
|
}
|