Skip to content

Commit

Permalink
Merge pull request Sunbird-Obsrv#160 from shikshalokam/release-5.0.0
Browse files Browse the repository at this point in the history
SB-30236 - Variable Name Changes on OnDemandDruidExhaust Job
  • Loading branch information
sowmya-dixit authored Jul 26, 2022
2 parents 2a4da07 + f711a24 commit 802fab8
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,17 @@ object OnDemandDruidExhaustJob extends BaseReportsJob with Serializable with IJo
val sortDfColNames = reportConf.get("sort").asInstanceOf[Option[List[String]]]
// Date Range with dynamic Start Date and End Date
if (requestParamsBody.contains("start_date")){
val intervalUpd = reportConf.getOrElse("dateRange",None).asInstanceOf[Map[String,AnyRef]].getOrElse("interval",None).asInstanceOf[Map[String,AnyRef]]
val intervalStartDateUpd = intervalUpd.updated("startDate",requestParamsBody.get("start_date"))
val updatedInterval = reportConf.getOrElse("dateRange",None).asInstanceOf[Map[String,AnyRef]].getOrElse("interval",None).asInstanceOf[Map[String,AnyRef]]
val updatedIntervalStartDate = updatedInterval.updated("startDate",requestParamsBody.get("start_date"))
val updatedDateRange = reportConf.get("dateRange").get.asInstanceOf[Map[String, AnyRef]] +
("interval" -> intervalStartDateUpd)
("interval" -> updatedIntervalStartDate)
reportConf = reportConf ++ Map("dateRange" -> updatedDateRange)
}
if (requestParamsBody.contains("end_date")){
val intervalUpd = reportConf.getOrElse("dateRange",None).asInstanceOf[Map[String,AnyRef]].getOrElse("interval",None).asInstanceOf[Map[String,AnyRef]]
val intervalEndDateUpd = intervalUpd.updated("endDate",requestParamsBody.get("end_date"))
val updatedInterval = reportConf.getOrElse("dateRange",None).asInstanceOf[Map[String,AnyRef]].getOrElse("interval",None).asInstanceOf[Map[String,AnyRef]]
val updatedIntervalEndDate = updatedInterval.updated("endDate",requestParamsBody.get("end_date"))
val updatedDateRange = reportConf.get("dateRange").get.asInstanceOf[Map[String, AnyRef]] +
("interval" -> intervalEndDateUpd)
("interval" -> updatedIntervalEndDate)
reportConf = reportConf ++ Map("dateRange" -> updatedDateRange)
}
val updatedMetrics:List[Map[String, AnyRef]] = reportConf.getOrElse("metrics", List()).asInstanceOf[List[Map[String,AnyRef]]].map( met => {
Expand Down

0 comments on commit 802fab8

Please sign in to comment.