upd gigachat scheduler

This commit is contained in:
Pasha 2025-05-14 14:19:08 +03:00
parent 569370bc05
commit e54d9a1666

@ -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 {