Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Commit

Permalink
< 120
Browse files Browse the repository at this point in the history
  • Loading branch information
freels committed Feb 24, 2011
1 parent fd4659f commit 85621c8
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main/scala/com/twitter/gizzard/GizzardServer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,24 @@ abstract class GizzardServer[S <: Shard, J <: JsonJob](config: ServerConfig) {
}

lazy val jobCodec = new ReplicatingJsonCodec(nameServer.jobRelay, logUnparsableJob)
lazy val jobScheduler = new PrioritizingJobScheduler(jobPriorities.map(p => p -> config.jobQueues(p)(jobCodec)).toMap)
lazy val jobScheduler = new PrioritizingJobScheduler(jobPriorities map { p =>
p -> config.jobQueues(p)(jobCodec)
} toMap)

lazy val copyScheduler = jobScheduler(copyPriority).asInstanceOf[JobScheduler[JsonJob]]


// service wiring

lazy val managerServer = new thrift.ManagerService(nameServer, copyFactory, jobScheduler, copyScheduler, repairFactory, repairPriority, diffFactory)
lazy val managerServer = new thrift.ManagerService(
nameServer,
copyFactory,
jobScheduler,
copyScheduler,
repairFactory,
repairPriority,
diffFactory)

lazy val managerThriftServer = config.manager(new thrift.Manager.Processor(managerServer))

lazy val jobInjectorServer = new thrift.JobInjectorService(jobCodec, jobScheduler)
Expand Down

0 comments on commit 85621c8

Please sign in to comment.