forked from xai-org/x-algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServer.scala
More file actions
32 lines (25 loc) · 997 Bytes
/
Copy pathServer.scala
File metadata and controls
32 lines (25 loc) · 997 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.twitter.botmaker.app.scarecrow
import com.twitter.botmaker.app.scarecrow.legacy.ScarecrowModule
import com.twitter.inject.TwitterModule
import com.twitter.thriftwebforms.MethodOptions
object BotMakerAppMain extends ScarecrowAppServer(isAdmin = false)
object BotMakerAdminMain extends ScarecrowAppServer(isAdmin = true)
class ScarecrowAppServer(isAdmin: Boolean = false)
extends com.twitter.botmaker.app.server.BotMakerAppServer {
override val modules: Seq[TwitterModule] = {
val module = new Module(isAdmin = isAdmin)
super.modules ++ Seq(
module,
new ScarecrowModule()
)
}
override def thriftWebFormsAccess =
MethodOptions.Access.ByLdapGroup(Seq("health-core-infra-team"))
override protected def postWarmup(): Unit = {
val initializer = injector.instance[BotmakerInitializer]
initializer.init()
val scarecrowBotMaker = injector.instance[ScarecrowBotMaker]
super.postWarmup(scarecrowBotMaker)
super.postWarmup()
}
}