Skip to content

Commit 1d68a2e

Browse files
authored
chore: comment sync stats cronjob
1 parent 9678995 commit 1d68a2e

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

server/cronjobs.go

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -491,27 +491,27 @@ func (s *Server) CleanExpiredSessionTokensCronjob() {
491491
}
492492

493493
// Sync service running status
494-
func (s *Server) SyncServiceRunningStatusCronjob() {
495-
for {
496-
// Fetch all services realtime info
497-
servicesRealtimeInfo, err := s.DOCKER_MANAGER.RealtimeInfoRunningServices()
498-
if err != nil {
499-
log.Println(err)
500-
} else {
501-
// Fetch all applications from db > ID, ServiceName, Status
502-
var applications []Application = make([]Application, 0)
503-
tx := s.DB_CLIENT.Select("id, service_name, status").Find(&applications)
504-
if tx.Error != nil {
505-
log.Println("Failed to fetch applications from db")
506-
log.Println(tx.Error)
507-
} else {
508-
for _, application := range applications {
509-
// check if service is found
510-
// TODO
511-
}
512-
}
513-
}
494+
// func (s *Server) SyncServiceRunningStatusCronjob() {
495+
// for {
496+
// // Fetch all services realtime info
497+
// servicesRealtimeInfo, err := s.DOCKER_MANAGER.RealtimeInfoRunningServices()
498+
// if err != nil {
499+
// log.Println(err)
500+
// } else {
501+
// // Fetch all applications from db > ID, ServiceName, Status
502+
// var applications []Application = make([]Application, 0)
503+
// tx := s.DB_CLIENT.Select("id, service_name, status").Find(&applications)
504+
// if tx.Error != nil {
505+
// log.Println("Failed to fetch applications from db")
506+
// log.Println(tx.Error)
507+
// } else {
508+
// for _, application := range applications {
509+
// // check if service is found
510+
// // TODO
511+
// }
512+
// }
513+
// }
514514

515-
time.Sleep(5 * time.Second)
516-
}
517-
}
515+
// time.Sleep(5 * time.Second)
516+
// }
517+
// }

0 commit comments

Comments
 (0)