Select correct lang in request, use timeout for request, fix sighandler panic
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user