diff --git a/bin/date.txt b/bin/date.txt index a0f53d8..07105fb 100644 --- a/bin/date.txt +++ b/bin/date.txt @@ -1 +1 @@ -2025-08-19 07:35:11.094 \ No newline at end of file +2025-09-04 13:20:53.037 \ No newline at end of file diff --git a/bin/subversion.txt b/bin/subversion.txt index c0433bf..e306a14 100644 --- a/bin/subversion.txt +++ b/bin/subversion.txt @@ -1 +1 @@ -00199 \ No newline at end of file +00200 \ No newline at end of file diff --git a/internal/loggers/loki_http/loki_http_test.go b/internal/loggers/loki_http/loki_http_test.go index 6460936..283c1de 100644 --- a/internal/loggers/loki_http/loki_http_test.go +++ b/internal/loggers/loki_http/loki_http_test.go @@ -16,7 +16,7 @@ func TestDownloadJSON(t *testing.T) { date2 := time.Now() date1 := carbon.NewCarbon(date2).AddDays(-2).StdTime() - Otvet, err := DownloadLogs("sync-service", date1, date2) + Otvet, err := DownloadLogs_full("sync-service", date1, date2) if err != nil { t.Error("TestDownloadJSON() error: ", err) } @@ -26,12 +26,12 @@ func TestDownloadJSON(t *testing.T) { //} } -func TestAuthentication(t *testing.T) { - ConfigMain.LoadEnv() - config.FillSettings() - - err := Authentication() - if err != nil { - t.Error("TestAuthentication() error: ", err) - } -} +//func TestAuthentication(t *testing.T) { +// ConfigMain.LoadEnv() +// config.FillSettings() +// +// err := Authentication() +// if err != nil { +// t.Error("TestAuthentication() error: ", err) +// } +//} diff --git a/internal/logic/sql/sql.go b/internal/logic/sql/sql.go index 9e66ce8..bed02c3 100644 --- a/internal/logic/sql/sql.go +++ b/internal/logic/sql/sql.go @@ -11,6 +11,7 @@ import ( "github.com/ManyakRus/telegram_loki/internal/telegram" "github.com/ManyakRus/telegram_loki/internal/types" "github.com/jackc/pgx/v5" + "html" "os" "path" "strings" @@ -193,6 +194,16 @@ func RunSQL1(Filename string) string { if err != nil { Otvet = fmt.Sprintf("db.QueryRow() Filename: %s, error: %v", FilenameShort, err) log.Error(Otvet) + + //отправим в телеграм + TextError := html.EscapeString(err.Error()) + Message1 := types.Message{} + Message1.Text = TextError + err = telegram.SendMessage(Message1) + if err != nil { + log.Error("telegram.SendMessage() error: ", err) + } + return Otvet } diff --git a/pkg/version/version.txt b/pkg/version/version.txt index c20f0b9..db076e0 100644 --- a/pkg/version/version.txt +++ b/pkg/version/version.txt @@ -1 +1 @@ -51b584c 2025-08-19 10:30:06 +0300 +5b708d4 2025-08-19 10:55:05 +0300