debug
This commit is contained in:
parent
9d2fc298c2
commit
bc0f185549
@ -110,6 +110,7 @@ func (r *GigaChatClient) TokenResearch(ctx context.Context) {
|
|||||||
select {
|
select {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
ttl, err := r.redisClient.TTL(ctx, "gigachat_token").Result()
|
ttl, err := r.redisClient.TTL(ctx, "gigachat_token").Result()
|
||||||
|
fmt.Println("GGCHATtoken", ttl, err, ttl<2*time.Minute)
|
||||||
if err != nil || ttl < 2*time.Minute {
|
if err != nil || ttl < 2*time.Minute {
|
||||||
if err := r.updateToken(ctx); err != nil {
|
if err := r.updateToken(ctx); err != nil {
|
||||||
r.logger.Error("failed to update GigaChat token", zap.Error(err))
|
r.logger.Error("failed to update GigaChat token", zap.Error(err))
|
||||||
|
Loading…
Reference in New Issue
Block a user