| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9cf03ff commit 4a89115
12 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,11 @@ | |||
| 1 | 1 | import commercial.CommercialLifecycle | |
| 2 | + import dfp.DfpDataCacheLifecycle | ||
| 2 | 3 | import common.dfp.FaciaDfpAgentLifecycle | |
| 3 | 4 | import common._ | |
| 4 | 5 | import conf._ | |
| 5 | 6 | import conf.switches.SwitchboardLifecycle | |
| 6 | 7 | import contentapi.SectionsLookUpLifecycle | |
| 7 | - import _root_.dfp.DfpDataCacheLifecycle | ||
| 8 | + import cricket.conf.CricketLifecycle | ||
| 8 | 9 | import feed.{MostPopularFacebookAutoRefreshLifecycle, MostReadLifecycle, OnwardJourneyLifecycle} | |
| 9 | 10 | import model.AdminLifecycle | |
| 10 | 11 | import ophan.SurgingContentAgentLifecycle | |
@@ -17,23 +18,23 @@ import headlines.ABHeadlinesLifecycle | |||
| 17 | 18 | import scala.concurrent.ExecutionContext | |
| 18 | 19 | ||
| 19 | 20 | object Global extends GlobalSettings with BackwardCompatibleLifecycleComponents | |
| 20 | - with DiagnosticsLifecycle | ||
| 21 | - with OnwardJourneyLifecycle | ||
| 22 | - with MostReadLifecycle | ||
| 23 | 21 | with FaciaDfpAgentLifecycle | |
| 24 | 22 | with ConfigAgentLifecycle | |
| 25 | 23 | with SurgingContentAgentLifecycle | |
| 26 | 24 | with SectionsLookUpLifecycle | |
| 27 | - with MostPopularFacebookAutoRefreshLifecycle | ||
| 28 | 25 | with SwitchboardLifecycle | |
| 29 | - with FootballLifecycle | ||
| 30 | - with CricketLifecycle | ||
| 31 | - with RugbyLifecycle | ||
| 32 | 26 | with ABHeadlinesLifecycle { | |
| 33 | 27 | ||
| 34 | 28 | override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = List( | |
| 35 | - new AdminLifecycle(appLifecycle)(ec), | ||
| 36 | - new CommercialLifecycle(appLifecycle)(ec), | ||
| 37 | - new DfpDataCacheLifecycle(appLifecycle)(ec) | ||
| 29 | + new AdminLifecycle(appLifecycle), | ||
| 30 | + new DiagnosticsLifecycle(appLifecycle), | ||
| 31 | + new OnwardJourneyLifecycle(appLifecycle), | ||
| 32 | + new CommercialLifecycle(appLifecycle), | ||
| 33 | + new MostReadLifecycle(appLifecycle), | ||
| 34 | + new DfpDataCacheLifecycle(appLifecycle), | ||
| 35 | + new MostPopularFacebookAutoRefreshLifecycle(appLifecycle), | ||
| 36 | + new FootballLifecycle(appLifecycle), | ||
| 37 | + new CricketLifecycle(appLifecycle), | ||
| 38 | + new RugbyLifecycle(appLifecycle) | ||
| 38 | 39 | ) | |
| 39 | 40 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,13 +1,21 @@ | |||
| 1 | 1 | import common.Logback.Logstash | |
| 2 | - import common.{CloudWatchApplicationMetrics, DiagnosticsLifecycle} | ||
| 3 | - import conf.DiagnosticsHealthCheckLifeCycle | ||
| 2 | + import common.{LifecycleComponent, BackwardCompatibleLifecycleComponents, CloudWatchApplicationMetrics, DiagnosticsLifecycle} | ||
| 3 | + import conf.InjectedCachedHealthCheckLifeCycle | ||
| 4 | 4 | import conf.switches.SwitchboardLifecycle | |
| 5 | + import controllers.HealthCheck | ||
| 6 | + import play.api.GlobalSettings | ||
| 7 | + import play.api.inject.ApplicationLifecycle | ||
| 5 | 8 | ||
| 6 | - object Global | ||
| 7 | - extends DiagnosticsLifecycle | ||
| 9 | + import scala.concurrent.ExecutionContext | ||
| 10 | + | ||
| 11 | + object Global extends GlobalSettings with BackwardCompatibleLifecycleComponents | ||
| 8 | 12 | with SwitchboardLifecycle | |
| 9 | 13 | with CloudWatchApplicationMetrics | |
| 10 | - with Logstash | ||
| 11 | - with DiagnosticsHealthCheckLifeCycle { | ||
| 14 | + with Logstash { | ||
| 12 | 15 | override lazy val applicationName = "frontend-diagnostics" | |
| 16 | + | ||
| 17 | + override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = List( | ||
| 18 | + new DiagnosticsLifecycle(appLifecycle), | ||
| 19 | + new InjectedCachedHealthCheckLifeCycle(HealthCheck) | ||
| 20 | + ) | ||
| 13 | 21 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,16 +1,22 @@ | |||
| 1 | - import common.CloudWatchApplicationMetrics | ||
| 1 | + import common.{LifecycleComponent, BackwardCompatibleLifecycleComponents, CloudWatchApplicationMetrics} | ||
| 2 | 2 | import common.Logback.Logstash | |
| 3 | 3 | import conf._ | |
| 4 | 4 | import conf.switches.SwitchboardLifecycle | |
| 5 | 5 | import filters.RequestLoggingFilter | |
| 6 | + import play.api.GlobalSettings | ||
| 6 | 7 | import play.api.http.HttpFilters | |
| 8 | + import play.api.inject.ApplicationLifecycle | ||
| 7 | 9 | import play.api.mvc.EssentialFilter | |
| 8 | 10 | ||
| 9 | - object Global extends CloudWatchApplicationMetrics | ||
| 11 | + import scala.concurrent.ExecutionContext | ||
| 12 | + | ||
| 13 | + object Global extends GlobalSettings with BackwardCompatibleLifecycleComponents | ||
| 14 | + with CloudWatchApplicationMetrics | ||
| 10 | 15 | with SwitchboardLifecycle | |
| 11 | - with Logstash | ||
| 12 | - with DiscussionHealthCheckLifeCycle { | ||
| 16 | + with Logstash { | ||
| 13 | 17 | override lazy val applicationName = "frontend-discussion" | |
| 18 | + | ||
| 19 | + override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = Nil | ||
| 14 | 20 | } | |
| 15 | 21 | ||
| 16 | 22 | class DiscussionFilters extends HttpFilters { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,13 @@ | |||
| 1 | 1 | import common.Logback.Logstash | |
| 2 | 2 | import common._ | |
| 3 | 3 | import conf.switches.SwitchboardLifecycle | |
| 4 | - import conf.{Configuration => GuardianConfiguration} | ||
| 5 | - import frontpress.{FrontPressCron, ToolPressQueueWorker} | ||
| 6 | 4 | import play.api.GlobalSettings | |
| 5 | + import play.api.inject.ApplicationLifecycle | ||
| 7 | 6 | import services.ConfigAgentLifecycle | |
| 8 | 7 | ||
| 9 | - object Global extends GlobalSettings | ||
| 8 | + import scala.concurrent.ExecutionContext | ||
| 9 | + | ||
| 10 | + object Global extends GlobalSettings with BackwardCompatibleLifecycleComponents | ||
| 10 | 11 | with ConfigAgentLifecycle | |
| 11 | 12 | with SwitchboardLifecycle | |
| 12 | 13 | with CloudWatchApplicationMetrics | |
@@ -25,4 +26,6 @@ object Global extends GlobalSettings | |||
| 25 | 26 | FaciaPressMetrics.AuPressLatencyMetric, | |
| 26 | 27 | FaciaPressMetrics.AllFrontsPressLatencyMetric | |
| 27 | 28 | ) | |
| 29 | + | ||
| 30 | + override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = Nil | ||
| 28 | 31 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,23 +1,32 @@ | |||
| 1 | 1 | import common.Logback.Logstash | |
| 2 | 2 | import common._ | |
| 3 | 3 | import common.dfp.FaciaDfpAgentLifecycle | |
| 4 | - import conf.FaciaHealthCheckLifeCycle | ||
| 4 | + import conf.InjectedCachedHealthCheckLifeCycle | ||
| 5 | 5 | import conf.switches.SwitchboardLifecycle | |
| 6 | + import controllers.HealthCheck | ||
| 6 | 7 | import crosswords.TodaysCrosswordGridLifecycle | |
| 7 | 8 | import headlines.ABHeadlinesLifecycle | |
| 8 | 9 | import ophan.SurgingContentAgentLifecycle | |
| 10 | + import play.api.GlobalSettings | ||
| 11 | + import play.api.inject.ApplicationLifecycle | ||
| 9 | 12 | import services.{ConfigAgentLifecycle, IndexListingsLifecycle} | |
| 10 | 13 | ||
| 11 | - object Global extends ConfigAgentLifecycle | ||
| 14 | + import scala.concurrent.ExecutionContext | ||
| 15 | + | ||
| 16 | + object Global extends GlobalSettings with BackwardCompatibleLifecycleComponents | ||
| 17 | + with ConfigAgentLifecycle | ||
| 12 | 18 | with CloudWatchApplicationMetrics | |
| 13 | 19 | with FaciaDfpAgentLifecycle | |
| 14 | 20 | with SurgingContentAgentLifecycle | |
| 15 | 21 | with IndexListingsLifecycle | |
| 16 | 22 | with TodaysCrosswordGridLifecycle | |
| 17 | 23 | with SwitchboardLifecycle | |
| 18 | 24 | with ABHeadlinesLifecycle | |
| 19 | - with Logstash | ||
| 20 | - with FaciaHealthCheckLifeCycle { | ||
| 25 | + with Logstash { | ||
| 21 | 26 | ||
| 22 | 27 | override lazy val applicationName = "frontend-facia" | |
| 28 | + | ||
| 29 | + override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = List( | ||
| 30 | + new InjectedCachedHealthCheckLifeCycle(HealthCheck) | ||
| 31 | + ) | ||
| 23 | 32 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,19 +1,25 @@ | |||
| 1 | - import common.CloudWatchApplicationMetrics | ||
| 1 | + import common.{LifecycleComponent, BackwardCompatibleLifecycleComponents, CloudWatchApplicationMetrics} | ||
| 2 | 2 | import common.Logback.Logstash | |
| 3 | 3 | import conf._ | |
| 4 | 4 | import conf.switches.SwitchboardLifecycle | |
| 5 | 5 | import play.api._ | |
| 6 | + import play.api.inject.ApplicationLifecycle | ||
| 6 | 7 | import play.api.inject.guice._ | |
| 7 | 8 | import utils.SafeLogging | |
| 8 | 9 | ||
| 9 | - object Global extends SafeLogging | ||
| 10 | + import scala.concurrent.ExecutionContext | ||
| 11 | + | ||
| 12 | + object Global extends GlobalSettings with BackwardCompatibleLifecycleComponents | ||
| 13 | + with SafeLogging | ||
| 10 | 14 | with CloudWatchApplicationMetrics | |
| 11 | - with IdentityLifecycle | ||
| 12 | 15 | with SwitchboardLifecycle | |
| 13 | - with Logstash | ||
| 14 | - with IdentityHealthCheckLifeCycle { | ||
| 16 | + with Logstash { | ||
| 15 | 17 | ||
| 16 | 18 | override lazy val applicationName = "frontend-identity" | |
| 19 | + | ||
| 20 | + override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = List( | ||
| 21 | + new IdentityLifecycle(appLifecycle) | ||
| 22 | + ) | ||
| 17 | 23 | } | |
| 18 | 24 | ||
| 19 | 25 | class IdentityApplicationLoader extends GuiceApplicationLoader() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,23 +1,32 @@ | |||
| 1 | 1 | import business.StocksDataLifecycle | |
| 2 | 2 | import common.Logback.Logstash | |
| 3 | - import common.{CloudWatchApplicationMetrics, ContentApiMetrics} | ||
| 3 | + import common.{LifecycleComponent, BackwardCompatibleLifecycleComponents, CloudWatchApplicationMetrics, ContentApiMetrics} | ||
| 4 | 4 | import conf.switches.SwitchboardLifecycle | |
| 5 | - import conf.OnwardHealthCheckLifeCycle | ||
| 5 | + import conf.InjectedCachedHealthCheckLifeCycle | ||
| 6 | + import controllers.HealthCheck | ||
| 6 | 7 | import feed.{MostPopularFacebookAutoRefreshLifecycle, MostReadLifecycle, OnwardJourneyLifecycle} | |
| 7 | 8 | import metrics.FrontendMetric | |
| 9 | + import play.api.GlobalSettings | ||
| 10 | + import play.api.inject.ApplicationLifecycle | ||
| 8 | 11 | ||
| 9 | - object Global extends OnwardJourneyLifecycle | ||
| 12 | + import scala.concurrent.ExecutionContext | ||
| 13 | + | ||
| 14 | + object Global extends GlobalSettings with BackwardCompatibleLifecycleComponents | ||
| 10 | 15 | with CloudWatchApplicationMetrics | |
| 11 | - with MostReadLifecycle | ||
| 12 | - with StocksDataLifecycle | ||
| 13 | - with MostPopularFacebookAutoRefreshLifecycle | ||
| 14 | 16 | with SwitchboardLifecycle | |
| 15 | - with Logstash | ||
| 16 | - with OnwardHealthCheckLifeCycle { | ||
| 17 | + with Logstash { | ||
| 17 | 18 | override lazy val applicationName = "frontend-onward" | |
| 18 | 19 | ||
| 19 | 20 | override def applicationMetrics: List[FrontendMetric] = super.applicationMetrics ++ Seq( | |
| 20 | 21 | ContentApiMetrics.HttpTimeoutCountMetric, | |
| 21 | 22 | ContentApiMetrics.ContentApiErrorMetric | |
| 22 | 23 | ) | |
| 24 | + | ||
| 25 | + override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = List( | ||
| 26 | + new InjectedCachedHealthCheckLifeCycle(HealthCheck), | ||
| 27 | + new OnwardJourneyLifecycle(appLifecycle), | ||
| 28 | + new MostReadLifecycle(appLifecycle), | ||
| 29 | + new StocksDataLifecycle(appLifecycle), | ||
| 30 | + new MostPopularFacebookAutoRefreshLifecycle(appLifecycle) | ||
| 31 | + ) | ||
| 23 | 32 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,12 @@ | |||
| 1 | - import controllers.PreviewHealthCheckLifeCycle | ||
| 1 | + import common.LifecycleComponent | ||
| 2 | + import conf.InjectedCachedHealthCheckLifeCycle | ||
| 3 | + import controllers.HealthCheck | ||
| 4 | + import play.api.inject.ApplicationLifecycle | ||
| 2 | 5 | ||
| 3 | - object Global extends StandaloneGlobal with PreviewHealthCheckLifeCycle | ||
| 6 | + import scala.concurrent.ExecutionContext | ||
| 7 | + | ||
| 8 | + object Global extends StandaloneGlobal { | ||
| 9 | + override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = { | ||
| 10 | + super.lifecycleComponents(appLifecycle) :+ new InjectedCachedHealthCheckLifeCycle(HealthCheck) | ||
| 11 | + } | ||
| 12 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,24 +1,33 @@ | |||
| 1 | 1 | import common.Logback.Logstash | |
| 2 | - import common.{CloudWatchApplicationMetrics, ContentApiMetrics} | ||
| 2 | + import common.{LifecycleComponent, BackwardCompatibleLifecycleComponents, CloudWatchApplicationMetrics, ContentApiMetrics} | ||
| 3 | 3 | import conf._ | |
| 4 | 4 | import conf.switches.SwitchboardLifecycle | |
| 5 | 5 | import contentapi.SectionsLookUpLifecycle | |
| 6 | + import controllers.HealthCheck | ||
| 6 | 7 | import metrics.FrontendMetric | |
| 7 | 8 | import ophan.SurgingContentAgentLifecycle | |
| 9 | + import play.api.GlobalSettings | ||
| 10 | + import play.api.inject.ApplicationLifecycle | ||
| 8 | 11 | import services.ConfigAgentLifecycle | |
| 9 | 12 | ||
| 10 | - object Global extends ConfigAgentLifecycle | ||
| 13 | + import scala.concurrent.ExecutionContext | ||
| 14 | + | ||
| 15 | + object Global extends GlobalSettings with BackwardCompatibleLifecycleComponents | ||
| 16 | + with ConfigAgentLifecycle | ||
| 11 | 17 | with CloudWatchApplicationMetrics | |
| 12 | 18 | with SurgingContentAgentLifecycle | |
| 13 | 19 | with SectionsLookUpLifecycle | |
| 14 | 20 | with SwitchboardLifecycle | |
| 15 | - with Logstash | ||
| 16 | - with RssHealthCheckLifeCycle { | ||
| 21 | + with Logstash { | ||
| 17 | 22 | override lazy val applicationName = "frontend-rss" | |
| 18 | 23 | ||
| 19 | 24 | override def applicationMetrics: List[FrontendMetric] = super.applicationMetrics ++ List( | |
| 20 | 25 | ContentApiMetrics.HttpTimeoutCountMetric, | |
| 21 | 26 | ContentApiMetrics.HttpLatencyTimingMetric, | |
| 22 | 27 | ContentApiMetrics.ContentApiErrorMetric | |
| 23 | 28 | ) | |
| 29 | + | ||
| 30 | + override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = List( | ||
| 31 | + new InjectedCachedHealthCheckLifeCycle(HealthCheck) | ||
| 32 | + ) | ||
| 24 | 33 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,17 +1,27 @@ | |||
| 1 | - import common.CloudWatchApplicationMetrics | ||
| 1 | + import common.{LifecycleComponent, BackwardCompatibleLifecycleComponents, CloudWatchApplicationMetrics} | ||
| 2 | 2 | import common.Logback.Logstash | |
| 3 | 3 | import conf._ | |
| 4 | 4 | import conf.switches.SwitchboardLifecycle | |
| 5 | + import cricket.conf.CricketLifecycle | ||
| 6 | + import football.controllers.HealthCheck | ||
| 5 | 7 | import ophan.SurgingContentAgentLifecycle | |
| 8 | + import play.api.GlobalSettings | ||
| 9 | + import play.api.inject.ApplicationLifecycle | ||
| 6 | 10 | import rugby.conf.RugbyLifecycle | |
| 7 | 11 | ||
| 8 | - object Global extends CloudWatchApplicationMetrics | ||
| 12 | + import scala.concurrent.ExecutionContext | ||
| 13 | + | ||
| 14 | + object Global extends GlobalSettings with BackwardCompatibleLifecycleComponents | ||
| 15 | + with CloudWatchApplicationMetrics | ||
| 9 | 16 | with SurgingContentAgentLifecycle | |
| 10 | 17 | with SwitchboardLifecycle | |
| 11 | - with FootballLifecycle | ||
| 12 | - with CricketLifecycle | ||
| 13 | - with RugbyLifecycle | ||
| 14 | - with Logstash | ||
| 15 | - with SportHealthCheckLifeCycle { | ||
| 18 | + with Logstash { | ||
| 16 | 19 | override lazy val applicationName = "frontend-sport" | |
| 20 | + | ||
| 21 | + override def lifecycleComponents(appLifecycle: ApplicationLifecycle)(implicit ec: ExecutionContext): List[LifecycleComponent] = List( | ||
| 22 | + new FootballLifecycle(appLifecycle), | ||
| 23 | + new CricketLifecycle(appLifecycle), | ||
| 24 | + new RugbyLifecycle(appLifecycle), | ||
| 25 | + new InjectedCachedHealthCheckLifeCycle(HealthCheck) | ||
| 26 | + ) | ||
| 17 | 27 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments