- update cron
continuous-integration/drone/push Build is passing Details

master v1.0.2
李光春 2 years ago
parent 7eb104bef7
commit e5d9cb9c66

@ -1,8 +1,10 @@
package gojobs
import (
"context"
"go.dtapp.net/gojobs/pb"
"google.golang.org/grpc"
"log"
)
// CronConfig 定时任务配置
@ -41,3 +43,13 @@ func NewCron(config *CronConfig) *Cron {
return c
}
// Send 发送
func (c *Cron) Send(in *pb.String) (*pb.String, error) {
stream, err := c.Pub.Publish(context.Background(), in)
if err != nil {
log.Printf("[定时任务]发送失败:%v\n", err)
}
log.Println("[定时任务]发送成功", stream)
return stream, err
}

@ -1,3 +1,3 @@
package gojobs
const Version = "1.0.1"
const Version = "1.0.2"

Loading…
Cancel
Save