From e54d9a1666cba2d1c44862ca7b89ee68b9c8fbd2 Mon Sep 17 00:00:00 2001 From: Pasha Date: Wed, 14 May 2025 14:19:08 +0300 Subject: [PATCH] upd gigachat scheduler --- gigachatwc/scheduler.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gigachatwc/scheduler.go b/gigachatwc/scheduler.go index cf3b250..9de356b 100644 --- a/gigachatwc/scheduler.go +++ b/gigachatwc/scheduler.go @@ -109,7 +109,8 @@ func (r *GigaChatTaskScheduler) handleMessage(ctx context.Context, msg MessageGi updJson string resp UpdJsonQuestionData ) - + // вот дилемма сколько попыток нам нужно? может ли гигачат отлючить нам некоторые ограничения + // можем ли мы скипать вопросы с которыми у нас произошла ошибка for i := 0; i < 10; i++ { updJson, err = r.gigaChatClient.SendMsg(ctx, audience, question) if err == nil { @@ -137,6 +138,7 @@ func (r *GigaChatTaskScheduler) handleMessage(ctx context.Context, msg MessageGi question.Title = resp.Title question.Description = resp.Description + question.Auditory = msg.ID _, err = r.dal.QuestionRepo.CreateQuestion(ctx, &question) if err != nil {