- 优化
continuous-integration/drone/tag Build is failing Details
continuous-integration/drone/push Build was killed Details

master v1.0.46
李光春 2 years ago
parent 7ad0f885be
commit 31a9c723f7

@ -1,3 +1,3 @@
package gojobs
const Version = "1.0.45"
const Version = "1.0.46"

@ -8,6 +8,7 @@ import (
"go.dtapp.net/goip"
"go.dtapp.net/gojobs/jobs_gorm_model"
"go.dtapp.net/golock"
"log"
"runtime"
)
@ -114,5 +115,9 @@ func NewJobsGorm(config *JobsGormConfig) (*JobsGorm, error) {
return nil, errors.New(fmt.Sprintf("没有配置 cornKeyChannels%s", c.config.cornKeyChannels))
}
if c.config.debug == true {
log.Printf("配置:%+v\n", c.config)
}
return c, nil
}

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"go.dtapp.net/gojobs/jobs_gorm_model"
"log"
"math/rand"
"time"
)
@ -63,6 +64,12 @@ func (j *JobsGorm) GetIssueAddress(ctx context.Context, v *jobs_gorm_model.Task)
// GetSubscribeClientList 获取在线的客户端
func (j *JobsGorm) GetSubscribeClientList(ctx context.Context) ([]string, error) {
if j.config.debug == true {
log.Printf("获取在线的客户端:%s\n", j.config.cornPrefix+"_*")
}
// 扫描
values, err := j.redisClient.Keys(ctx, j.config.cornPrefix+"_*").Result()
if err != nil {
return nil, errors.New(fmt.Sprintf("获取失败:%s", err.Error()))

Loading…
Cancel
Save