Skip to content

Commit

Permalink
Update dfs flow to use new config object. (#1010)
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-rieke committed Mar 26, 2024
1 parent 4a5d52d commit 1bec9b0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions atrium/vestibulum/trcflow/flows/process_dataflowstatistics.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func getDataFlowStatisticsSchema(tableName string) sqle.PrimaryKeySchema {

func dataFlowStatPullRemote(tfmContext *flowcore.TrcFlowMachineContext, tfContext *flowcore.TrcFlowContext) error {
tenantIndexPath, tenantDFSIdPath := coreopts.BuildOptions.GetDFSPathName()
tenantListData, tenantListErr := tfContext.GoMod.List("super-secrets/PublicIndex/"+tenantIndexPath+"/"+tenantDFSIdPath, tfmContext.Config.Log)
tenantListData, tenantListErr := tfContext.GoMod.List("super-secrets/PublicIndex/"+tenantIndexPath+"/"+tenantDFSIdPath, tfmContext.DriverConfig.CoreConfig.Log)
if tenantListErr != nil {
return tenantListErr
}
Expand All @@ -89,14 +89,14 @@ func dataFlowStatPullRemote(tfmContext *flowcore.TrcFlowMachineContext, tfContex

for _, tenantIdList := range tenantListData.Data {
for _, tenantId := range tenantIdList.([]interface{}) {
flowGroupNameListData, flowGroupNameListErr := tfContext.GoMod.List("super-secrets/PublicIndex/"+tenantIndexPath+"/"+tenantDFSIdPath+"/"+tenantId.(string)+"/DataFlowStatistics/DataFlowGroup", tfmContext.Config.Log)
flowGroupNameListData, flowGroupNameListErr := tfContext.GoMod.List("super-secrets/PublicIndex/"+tenantIndexPath+"/"+tenantDFSIdPath+"/"+tenantId.(string)+"/DataFlowStatistics/DataFlowGroup", tfmContext.DriverConfig.CoreConfig.Log)
if flowGroupNameListErr != nil {
return flowGroupNameListErr
}

for _, flowGroupNameList := range flowGroupNameListData.Data {
for _, flowGroup := range flowGroupNameList.([]interface{}) {
listData, listErr := tfContext.GoMod.List("super-secrets/PublicIndex/"+tenantIndexPath+"/"+tenantDFSIdPath+"/"+tenantId.(string)+"/DataFlowStatistics/DataFlowGroup/"+flowGroup.(string)+"/dataFlowName/", tfmContext.Config.Log)
listData, listErr := tfContext.GoMod.List("super-secrets/PublicIndex/"+tenantIndexPath+"/"+tenantDFSIdPath+"/"+tenantId.(string)+"/DataFlowStatistics/DataFlowGroup/"+flowGroup.(string)+"/dataFlowName/", tfmContext.DriverConfig.CoreConfig.Log)
if listData == nil {
continue
}
Expand All @@ -110,7 +110,7 @@ func dataFlowStatPullRemote(tfmContext *flowcore.TrcFlowMachineContext, tfContex
testName = strings.ReplaceAll(testName.(string), "/", "")
dfGroup := flowcore.InitDataFlow(nil, flowGroup.(string), false)
if listData != nil {
err := dfGroup.RetrieveStatistic(tfContext.GoMod, tenantId.(string), tenantIndexPath, tenantDFSIdPath, flowGroup.(string), testName.(string), tfmContext.Config.Log)
err := dfGroup.RetrieveStatistic(tfContext.GoMod, tenantId.(string), tenantIndexPath, tenantDFSIdPath, flowGroup.(string), testName.(string), tfmContext.DriverConfig.CoreConfig.Log)
if err != nil {
tfmContext.Log("Failed to retrieve statistic", err)
}
Expand Down Expand Up @@ -239,7 +239,7 @@ func ProcessDataFlowStatConfigurations(tfmContext *flowcore.TrcFlowMachineContex
if tfContext.CancelContext != nil {
tfContext.CancelContext() //This cancel also pushes any final changes to vault before closing sync cycle.
var baseTableTemplate extract.TemplateResultData
trcvutils.LoadBaseTemplate(tfmContext.Config, &baseTableTemplate, tfContext.GoMod, tfContext.FlowSource, tfContext.Flow.ServiceName(), tfContext.FlowPath)
trcvutils.LoadBaseTemplate(tfmContext.DriverConfig, &baseTableTemplate, tfContext.GoMod, tfContext.FlowSource, tfContext.Flow.ServiceName(), tfContext.FlowPath)
tfContext.FlowData = &baseTableTemplate
}
tfmContext.Log("DataFlowStatistics flow is being stopped...", nil)
Expand Down

0 comments on commit 1bec9b0

Please sign in to comment.