Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWorker ¶
func NewWorker(service factory.ServiceFactory) factory.AppServerFactory
NewWorker create new cron worker
Types ¶
type Job ¶
type Job struct { ID string `bson:"_id" json:"_id"` TaskName string `bson:"task_name" json:"task_name"` Arguments string `bson:"arguments" json:"arguments"` Retries int `bson:"retries" json:"retries"` MaxRetry int `bson:"max_retry" json:"max_retry"` Interval string `bson:"interval" json:"interval"` CreatedAt string `bson:"created_at" json:"created_at"` FinishedAt string `bson:"finished_at" json:"finished_at"` Status string `bson:"status" json:"status"` Error string `bson:"error" json:"error"` TraceID string `bson:"traceId" json:"traceId"` NextRetryAt string `bson:"-" json:"-"` }
Job model
type JobListResolver ¶
JobListResolver resolver
type Meta ¶
type Meta struct { Page int Limit int TotalRecords int TotalPages int Detail struct { GiveUp, Retrying, Success, Queueing, Stopped int } }
Meta resolver
type QueueStorage ¶
type QueueStorage interface { GetAllJobs(taskName string) []*Job PushJob(job *Job) PopJob(taskName string) Job NextJob(taskName string) *Job Clear(taskName string) }
QueueStorage abstraction for queue storage backend
func NewRedisQueue ¶
func NewRedisQueue(redisPool *redis.Pool) QueueStorage
NewRedisQueue init inmem queue
type TaglineResolver ¶
type TaglineResolver struct { Tagline string TaskListClientSubscribers []string JobListClientSubscribers []string }
TaglineResolver resolver
type TaskResolver ¶
type TaskResolver struct { Name string TotalJobs int Detail struct { GiveUp, Retrying, Success, Queueing, Stopped int } }
TaskResolver resolver
Click to show internal directories.
Click to hide internal directories.