Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReleaseTask ¶
func ReleaseTask(t *Task)
Types ¶
type DbTask ¶
type DbTask struct { Id uint `json:"id"` Token string `json:"token"` Uid string `json:"uid"` Score int64 `json:"score"` Name string `json:"name"` Type pb.TaskType `json:"type"` Times int `json:"times"` // 发送次数 RetryTimes int `json:"retry_times"` // 重试次数 ExecTime time.Time `json:"exec_time"` // 执行时间 NextExecTime *time.Time `json:"next_exec_time"` // 下次执行时间 Schema string `json:"schema"` Address string `json:"address"` Path string `json:"path"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `json:"deleted_at"` }
type MongoTask ¶
type MongoTask struct { Id primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty" copy:"-"` Score int64 `json:"score" bson:"score"` Token string `json:"token" bson:"token"` Uid string `json:"uid" bson:"uid"` Name string `json:"name" bson:"name"` Args string `json:"args" bson:"args"` Type int32 `json:"type" bson:"type"` Times int `json:"times" bson:"times"` // 发送次数 RetryTimes int `json:"retry_times" bson:"retry_times"` // 重试次数 ExecTime int64 `json:"exec_time" bson:"exec_time"` // 执行时间 NextExecTime int64 `json:"next_exec_time,omitempty" bson:"next_exec_time"` // 下次执行时间 Schema string `json:"schema,omitempty" bson:"schema"` Address string `json:"address,omitempty" bson:"address"` Path string `json:"path,omitempty" bson:"path"` CreatedAt int64 `json:"created_at,omitempty" bson:"created_at"` UpdatedAt int64 `json:"updated_at,omitempty" bson:"updated_at"` DeletedAt int64 `json:"deleted_at,omitempty" bson:"deleted_at"` }
func (*MongoTask) Collection ¶
type Task ¶
type Task struct { Id string `json:"id,omitempty"` Score int64 `json:"score"` Uid string `json:"uid"` Name string `json:"name"` Args string `json:"args"` Type int32 `json:"type"` Times int `json:"times"` // 发送次数 RetryTimes int `json:"retry_times"` // 重试次数 ExecTime int64 `json:"exec_time"` // 执行时间 NextExecTime int64 `json:"next_exec_time,omitempty"` // 下次执行时间 Schema string `json:"schema,omitempty"` Address string `json:"address,omitempty"` Path string `json:"path,omitempty"` CreatedAt int64 `json:"created_at,omitempty"` UpdatedAt int64 `json:"updated_at,omitempty"` DeletedAt int64 `json:"deleted_at,omitempty"` }
func GenerateTask ¶
func GenerateTask() *Task
func (*Task) ConvertRedisTask ¶
func (*Task) NextDelayTime ¶
Click to show internal directories.
Click to hide internal directories.