mirror of
https://github.com/ManyakRus/telegram_loki.git
synced 2025-01-04 13:23:07 +02:00
сделал TELEGRAM_MESSAGES_COUNT
This commit is contained in:
parent
931c9d03de
commit
972e80527a
@ -3,9 +3,10 @@ TELEGRAM_APP_ID=
|
||||
TELEGRAM_APP_HASH=
|
||||
TELEGRAM_PHONE_FROM=
|
||||
TELEGRAM_PHONE_SEND_TEST=
|
||||
TELEGRAM_CHAT_NAME=
|
||||
TELEGRAM_MESSAGES_COUNT=
|
||||
|
||||
LOKI_URL=
|
||||
GRAFANA_LOGIN=
|
||||
GRAFANA_PASSWORD=
|
||||
|
||||
TELEGRAM_CHAT_NAME=
|
||||
|
@ -27,6 +27,7 @@ LOKI_URL=
|
||||
GRAFANA_LOGIN=
|
||||
GRAFANA_PASSWORD=
|
||||
TELEGRAM_CHAT_NAME=
|
||||
TELEGRAM_MESSAGES_COUNT=
|
||||
|
||||
|
||||
3. Fill in the settings/services.txt file
|
||||
|
@ -1 +1 @@
|
||||
2023-10-16 06:56:58.125
|
||||
2023-10-19 06:39:37.367
|
@ -1,29 +1,35 @@
|
||||
{
|
||||
"admin-service": "@t_bondarenko140",
|
||||
"billing-status-service": "@ivanov_i_i",
|
||||
"calendar-service": "@rexMonstra",
|
||||
"claim-service": "@nich2000",
|
||||
"close-service": "",
|
||||
"calendar-service": "@AliceDwarf",
|
||||
"claim-service": "@t_bondarenko140",
|
||||
"close-service": "@rexMonstra",
|
||||
"cryptopro-service": "@ivanov_i_i",
|
||||
"docone-service": "",
|
||||
"fnsndscaws-service": "@ivanov_i_i",
|
||||
"inner-notify-service": "",
|
||||
"inner-notify-service": "@t_bondarenko140",
|
||||
"kafka-service": "@ivanov_i_i",
|
||||
"loop-service": "",
|
||||
"monitor-service": "@nich2000",
|
||||
"notifi-delivery-service": "",
|
||||
"loop-service": "@rexMonstra",
|
||||
"monitor-service": "@rexMonstra",
|
||||
"notifi-delivery-service": "@ivanov_i_i",
|
||||
"notify-service": "@ivanov_i_i",
|
||||
"nsi-service": "@ivanov_i_i",
|
||||
"pdf-service": "@t_bondarenko140",
|
||||
"plan-service": "",
|
||||
"plan-service": "@rexMonstra",
|
||||
"post-office_service": "@ivanov_i_i",
|
||||
"preclaim-service": "",
|
||||
"preclaim-service": "@t_bondarenko140",
|
||||
"pretrial-service": "@t_bondarenko140",
|
||||
"rabbit-service": "@ivanov_i_i",
|
||||
"report-service": "",
|
||||
"report-service": "@rexMonstra",
|
||||
"snotify-service": "",
|
||||
"state-duty-service": "",
|
||||
"status-service": "",
|
||||
"state-duty-service": "@AliceDwarf",
|
||||
"stage-service": "@rexMonstra",
|
||||
"status-service": "@rexMonstra",
|
||||
"sync-service": "@nich2000",
|
||||
"schedule-service": "@t_bondarenko140",
|
||||
"state-duty-service": "@AliceDwarf",
|
||||
"casebook-service": "@ManyakRus",
|
||||
"debezium-adapter-postgres": "@ManyakRus",
|
||||
"debtors-list": "@ManyakRus"
|
||||
"debtors-list": "@ManyakRus",
|
||||
"stack-exchange-postgres": "@ManyakRus"
|
||||
}
|
@ -1 +1 @@
|
||||
00132
|
||||
00133
|
@ -11,11 +11,12 @@ var Settings SettingsINI
|
||||
|
||||
// SettingsINI - структура для хранения всех нужных переменных окружения
|
||||
type SettingsINI struct {
|
||||
LOKI_URL string
|
||||
TELEGRAM_CHAT_NAME string
|
||||
GRAFANA_LOGIN string
|
||||
GRAFANA_PASSWORD string
|
||||
INTERVAL_SEND_MINUTES int
|
||||
LOKI_URL string
|
||||
TELEGRAM_CHAT_NAME string
|
||||
GRAFANA_LOGIN string
|
||||
GRAFANA_PASSWORD string
|
||||
INTERVAL_SEND_MINUTES int
|
||||
TELEGRAM_MESSAGES_COUNT int
|
||||
}
|
||||
|
||||
// FillSettings загружает переменные окружения в структуру из переменных окружения
|
||||
@ -31,6 +32,10 @@ func FillSettings() {
|
||||
if err != nil {
|
||||
Settings.INTERVAL_SEND_MINUTES = 10
|
||||
}
|
||||
Settings.TELEGRAM_MESSAGES_COUNT, err = strconv.Atoi(os.Getenv("TELEGRAM_MESSAGES_COUNT"))
|
||||
if err != nil || Settings.TELEGRAM_MESSAGES_COUNT == 0 {
|
||||
Settings.TELEGRAM_MESSAGES_COUNT = 1
|
||||
}
|
||||
|
||||
if Settings.TELEGRAM_CHAT_NAME == "" {
|
||||
log.Panic("Error: Need fill TELEGRAM_CHAT_NAME")
|
||||
|
@ -27,6 +27,7 @@ LOKI_URL=
|
||||
GRAFANA_LOGIN=
|
||||
GRAFANA_PASSWORD=
|
||||
TELEGRAM_CHAT_NAME=
|
||||
TELEGRAM_MESSAGES_COUNT=
|
||||
|
||||
|
||||
3. Заполнить файл settings/services.txt
|
||||
|
Loading…
Reference in New Issue
Block a user