@@ -42,7 +42,9 @@ type DeployedApplicationEventProcessorImpl struct {
42
42
installedAppRepository repository.InstalledAppRepository
43
43
}
44
44
45
- func NewDeployedApplicationEventProcessorImpl (logger * zap.SugaredLogger , pubSubClient * pubsub.PubSubClientServiceImpl ,
45
+ func NewDeployedApplicationEventProcessorImpl (logger * zap.SugaredLogger ,
46
+ pubSubClient * pubsub.PubSubClientServiceImpl ,
47
+ appService app.AppService ,
46
48
gitOpsConfigReadService config.GitOpsConfigReadService ,
47
49
installedAppService FullMode.InstalledAppDBExtendedService ,
48
50
workflowDagExecutor dag.WorkflowDagExecutor ,
@@ -54,6 +56,7 @@ func NewDeployedApplicationEventProcessorImpl(logger *zap.SugaredLogger, pubSubC
54
56
deployedApplicationEventProcessorImpl := & DeployedApplicationEventProcessorImpl {
55
57
logger : logger ,
56
58
pubSubClient : pubSubClient ,
59
+ appService : appService ,
57
60
gitOpsConfigReadService : gitOpsConfigReadService ,
58
61
installedAppService : installedAppService ,
59
62
workflowDagExecutor : workflowDagExecutor ,
@@ -86,10 +89,10 @@ func (impl *DeployedApplicationEventProcessorImpl) SubscribeArgoAppUpdate() erro
86
89
_ , err = impl .pipelineRepository .GetArgoPipelineByArgoAppName (app .ObjectMeta .Name )
87
90
if err != nil && err == pg .ErrNoRows {
88
91
impl .logger .Infow ("this app not found in pipeline table looking in installed_apps table" , "appName" , app .ObjectMeta .Name )
89
- //if not found in pipeline table then search in installed_apps table
92
+ // if not found in pipeline table then search in installed_apps table
90
93
installedAppModel , err := impl .installedAppRepository .GetInstalledAppByGitOpsAppName (app .ObjectMeta .Name )
91
94
if err == pg .ErrNoRows {
92
- //no installed_apps found
95
+ // no installed_apps found
93
96
impl .logger .Errorw ("no installed apps found" , "err" , err )
94
97
return
95
98
}
@@ -98,7 +101,7 @@ func (impl *DeployedApplicationEventProcessorImpl) SubscribeArgoAppUpdate() erro
98
101
return
99
102
}
100
103
if installedAppModel .Id > 0 {
101
- //app found in installed_apps table hence setting flag to true
104
+ // app found in installed_apps table hence setting flag to true
102
105
isAppStoreApplication = true
103
106
} else {
104
107
// app neither found in installed_apps nor in pipeline table hence returning
0 commit comments