env added

This commit is contained in:
nquidox 2026-02-28 23:32:47 +03:00
parent 13ebb27335
commit 56309cafb9
2 changed files with 3 additions and 0 deletions

View file

@ -14,6 +14,7 @@ GRPC_SURUGAYA_SCRAPPER_PORT=9070
TASK_RETRY_COUNT=3 TASK_RETRY_COUNT=3
TASK_RETRY_MINUTES=5 TASK_RETRY_MINUTES=5
TASK_TIMEOUT_MINUTES=5
ORIGIN_SURUGAYA_ENABLED=false ORIGIN_SURUGAYA_ENABLED=false
ORIGIN_MANDARAKE_ENABLED=false ORIGIN_MANDARAKE_ENABLED=false

View file

@ -29,6 +29,7 @@ type GrpcConfig struct {
type TasksConfig struct { type TasksConfig struct {
RetryCount int RetryCount int
RetryMinutes int RetryMinutes int
TaskTimeout int
} }
type OriginEnabled struct { type OriginEnabled struct {
@ -62,6 +63,7 @@ func NewConfig() *Config {
TasksCfg: TasksConfig{ TasksCfg: TasksConfig{
RetryCount: getEnvInt("TASK_RETRY_COUNT", 3), RetryCount: getEnvInt("TASK_RETRY_COUNT", 3),
RetryMinutes: getEnvInt("TASK_RETRY_MINUTES", 5), RetryMinutes: getEnvInt("TASK_RETRY_MINUTES", 5),
TaskTimeout: getEnvInt("TASK_TIMEOUT_MINUTES", 5),
}, },
OriginEnabled: OriginEnabled{ OriginEnabled: OriginEnabled{