1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-23 22:45:11 +02:00

сделал defer stopapp.GetWaitGroup_Main().Done()

This commit is contained in:
Nikitin Aleksandr
2025-05-15 14:29:04 +03:00
parent 6bb95b522c
commit 7b05a88a6b
20 changed files with 30 additions and 30 deletions

View File

@@ -132,7 +132,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. chatgpt_connect")
}
//

View File

@@ -128,7 +128,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. chatgpt_proxy")
}
//

View File

@@ -231,7 +231,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. email")
}
//

View File

@@ -261,7 +261,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. email_imap")
}
//

View File

@@ -106,7 +106,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. fiber_connect")
}
//ждём пока отправляемых сейчас сообщений будет =0

View File

@@ -173,7 +173,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. kafka_connect")
}
//

View File

@@ -186,7 +186,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. minio_connect")
}
//

View File

@@ -194,7 +194,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. mssql_connect")
}
//

View File

@@ -208,7 +208,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. mssql_gorm")
}
//

View File

@@ -135,7 +135,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled. NATS_Connect.")
log.Warn("Context app is canceled. nats_connect.")
}
CloseConnection()

View File

@@ -257,7 +257,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled. NATS_Liveness.")
log.Warn("Context app is canceled. nats_liveness.")
}
if Ticker != nil {

View File

@@ -266,7 +266,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled. Postgres gorm.")
log.Warn("Context app is canceled. postgres_gorm")
}
//

View File

@@ -268,7 +268,7 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled. Postgres gorm.")
log.Warn("Context app is canceled. postgres_gorm2")
}
//
@@ -456,7 +456,7 @@ loop:
for {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled. postgres_gorm.ping")
log.Warn("Context app is canceled. postgres_gorm2.ping")
break loop
case <-ticker.C:
err = port_checker.CheckPort_err(Settings.DB_HOST, Settings.DB_PORT)

View File

@@ -237,7 +237,7 @@ func CloseConnection_err() error {
mutex_Connect.Lock()
defer mutex_Connect.Unlock()
err := GetConnection().Close(ctx)
err := Conn.Close(ctx)
return err
}
@@ -248,11 +248,11 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. postgres_pgx")
}
//
stopapp.WaitTotalMessagesSendingNow("Postgres pgx")
stopapp.WaitTotalMessagesSendingNow("postgres_pgx")
//
CloseConnection()

View File

@@ -204,11 +204,11 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. postgres_sqlx")
}
//
stopapp.WaitTotalMessagesSendingNow("Postgres sqlx")
stopapp.WaitTotalMessagesSendingNow("postgres_sqlx")
//
err := CloseConnection()
@@ -316,7 +316,7 @@ loop:
for {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled. postgres_connect.ping")
log.Warn("Context app is canceled. postgres_sqlx.ping")
break loop
case <-ticker.C:
err = port_checker.CheckPort_err(Settings.DB_HOST, Settings.DB_PORT)

View File

@@ -264,11 +264,11 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. postgres_stek")
}
//
stopapp.WaitTotalMessagesSendingNow("Postgres stek")
stopapp.WaitTotalMessagesSendingNow("postgres_stek")
//
CloseConnectionAll()

View File

@@ -115,7 +115,7 @@ func WaitStop() {
contextmain.CancelContext()
}
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. stopapp")
}
GetWaitGroup_Main().Done()

View File

@@ -123,11 +123,11 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled. NATS.")
log.Warn("Context app is canceled. sync_exchange_connect")
}
//ждём пока отправляемых сейчас сообщений будет =0
stopapp.WaitTotalMessagesSendingNow("nats SyncExchange")
stopapp.WaitTotalMessagesSendingNow("sync_exchange_connect")
//закрываем соединение
CloseConnection()
@@ -176,7 +176,7 @@ loop:
for {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled. postgres_pgx.ping")
log.Warn("Context app is canceled. sync_exchange_connect.ping")
break loop
case <-ticker.C:
err = PprofNats1()

View File

@@ -759,11 +759,11 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. telegram_client")
}
//
stopapp.WaitTotalMessagesSendingNow("telegram")
stopapp.WaitTotalMessagesSendingNow("telegram_client")
//
CloseConnection()

View File

@@ -235,11 +235,11 @@ func WaitStop() {
select {
case <-contextmain.GetContext().Done():
log.Warn("Context app is canceled.")
log.Warn("Context app is canceled. whatsapp_connect")
}
//
stopapp.WaitTotalMessagesSendingNow("whatsapp")
stopapp.WaitTotalMessagesSendingNow("whatsapp_connect")
//
StopWhatsApp()