Select correct lang in request, use timeout for request, fix sighandler panic

This commit is contained in:
eleksir
2026-05-03 16:41:32 +03:00
parent 7d3c083cea
commit 11ea7b8398
5 changed files with 19 additions and 5 deletions

View File

@@ -5,6 +5,8 @@ import (
"time"
)
const maxRetryAttempts = 15
// CronTask sends generated holiday list to the channel.
func CronTask() {
var (
@@ -22,7 +24,7 @@ func CronTask() {
if err != nil {
errcnt++
log.Errorf("Unable to get holidays (try %d/15): %s", errcnt, err)
log.Errorf("Unable to get holidays (try %d/%d): %s", errcnt, maxRetryAttempts, err)
switch errcnt {
case 1, 2: