- enable scalariform for akka transcode
This commit is contained in:
parent
bee4b79b51
commit
a687b71fc1
31
akka-bbb-transcode/.scalariform.conf
Normal file
31
akka-bbb-transcode/.scalariform.conf
Normal file
@ -0,0 +1,31 @@
|
||||
#alignArguments=false
|
||||
alignParameters=true
|
||||
alignSingleLineCaseStatements=true
|
||||
#alignSingleLineCaseStatements.maxArrowIndent=40
|
||||
#allowParamGroupsOnNewlines=false
|
||||
#compactControlReadability=false
|
||||
#compactStringConcatenation=false
|
||||
danglingCloseParenthesis=Force
|
||||
#doubleIndentClassDeclaration=false
|
||||
doubleIndentConstructorArguments=true
|
||||
doubleIndentMethodDeclaration=true
|
||||
firstArgumentOnNewline=Force
|
||||
firstParameterOnNewline=Force
|
||||
#formatXml=true
|
||||
#indentLocalDefs=false
|
||||
#indentPackageBlocks=true
|
||||
#indentSpaces=2
|
||||
#indentWithTabs=false
|
||||
#multilineScaladocCommentsStartOnFirstLine=false
|
||||
#newlineAtEndOfFile=false
|
||||
#placeScaladocAsterisksBeneathSecondAsterisk=false
|
||||
#preserveSpaceBeforeArguments=false
|
||||
#rewriteArrowSymbols=false
|
||||
singleCasePatternOnNewline=false
|
||||
#spaceBeforeColon=false
|
||||
#spaceBeforeContextColon=false
|
||||
#spaceInsideBrackets=false
|
||||
#spaceInsideParentheses=false
|
||||
#spacesAroundMultiImports=true
|
||||
#spacesWithinPatternBinders=true
|
||||
|
@ -1,8 +1,5 @@
|
||||
import org.bigbluebutton.build._
|
||||
|
||||
import scalariform.formatter.preferences._
|
||||
import com.typesafe.sbt.SbtScalariform
|
||||
import com.typesafe.sbt.SbtScalariform.ScalariformKeys
|
||||
import NativePackagerHelper._
|
||||
import com.typesafe.sbt.SbtNativePackager.autoImport._
|
||||
|
||||
@ -45,12 +42,9 @@ retrieveManaged := true
|
||||
Seq(Revolver.settings: _*)
|
||||
lazy val bbbAppsAkka = (project in file(".")).settings(name := "bbb-apps-akka", libraryDependencies ++= Dependencies.runtime).settings(compileSettings)
|
||||
|
||||
scalariformAutoformat := false
|
||||
|
||||
scalariformPreferences := scalariformPreferences.value
|
||||
.setPreference(AlignSingleLineCaseStatements, true)
|
||||
.setPreference(DoubleIndentConstructorArguments, true)
|
||||
.setPreference(AlignParameters, true)
|
||||
// See https://github.com/scala-ide/scalariform
|
||||
// Config file is in ./.scalariform.conf
|
||||
scalariformAutoformat := true
|
||||
|
||||
//-----------
|
||||
// Packaging
|
||||
|
@ -20,14 +20,16 @@ object AppsRedisSubscriberActor extends RedisSubscriber {
|
||||
classOf[AppsRedisSubscriberActor],
|
||||
system, jsonMsgBus,
|
||||
redisHost, redisPort,
|
||||
channels, patterns).withDispatcher("akka.redis-subscriber-worker-dispatcher")
|
||||
channels, patterns
|
||||
).withDispatcher("akka.redis-subscriber-worker-dispatcher")
|
||||
}
|
||||
|
||||
class AppsRedisSubscriberActor(
|
||||
system: ActorSystem,
|
||||
msgBus: IncomingJsonMessageBus, redisHost: String,
|
||||
redisPort: Int,
|
||||
channels: Seq[String] = Nil, patterns: Seq[String] = Nil)
|
||||
system: ActorSystem,
|
||||
msgBus: IncomingJsonMessageBus, redisHost: String,
|
||||
redisPort: Int,
|
||||
channels: Seq[String] = Nil, patterns: Seq[String] = Nil
|
||||
)
|
||||
extends RedisSubscriberProvider(system, "BbbTranscodeAkkaSub", channels, patterns, msgBus) with SystemConfiguration {
|
||||
|
||||
var lastPongReceivedOn = 0L
|
||||
|
@ -16,7 +16,7 @@ object JsonMsgHdlrActor {
|
||||
}
|
||||
|
||||
class JsonMsgHdlrActor(val inGW: TranscodingInGW) extends Actor with ActorLogging
|
||||
with SystemConfiguration with JsonMsgDeserializer {
|
||||
with SystemConfiguration with JsonMsgDeserializer {
|
||||
def receive = {
|
||||
case msg: ReceivedJsonMessage =>
|
||||
log.debug("handling {} - {}", msg.channel, msg.data)
|
||||
|
@ -8,14 +8,13 @@ import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.common2.util.JsonUtil
|
||||
import org.bigbluebutton.common2.redis.MessageSender
|
||||
|
||||
|
||||
object MessageSenderActor {
|
||||
def props(msgSender: MessageSender): Props =
|
||||
Props(classOf[MessageSenderActor], msgSender)
|
||||
}
|
||||
|
||||
class MessageSenderActor(val msgSender: MessageSender)
|
||||
extends Actor with ActorLogging {
|
||||
extends Actor with ActorLogging {
|
||||
|
||||
val fromBbbTranscodeRedisChannel = "bigbluebutton:from-bbb-transcode:system"
|
||||
val routing = collection.immutable.HashMap("sender" -> "bbb-transcode")
|
||||
|
@ -13,7 +13,7 @@ object TranscodingActor extends SystemConfiguration {
|
||||
}
|
||||
|
||||
class TranscodingActor(val system: ActorSystem, messageSender: MessageSender)
|
||||
extends Actor with ActorLogging with TranscodingObserverApp {
|
||||
extends Actor with ActorLogging with TranscodingObserverApp {
|
||||
val transcodersModel = new TranscodersModel()
|
||||
|
||||
val messageSenderActor = context.actorOf(MessageSenderActor.props(messageSender), "bbb-sender-actor")
|
||||
|
Loading…
Reference in New Issue
Block a user