Documentation
¶
Index ¶
- Constants
- type AccountDelete
- type Detail
- type InstanceDelete
- type PostDelete
- type PostDeleteReactions
- type PostDeleteRevisions
- type PostDeleteTimelines
- type PostPublish
- type PostPublishTimelines
- type ProfileDelete
- type Schedule
- type Scheduler
- func (scheduler *Scheduler) AutoCleanupOldJobs(every time.Duration)
- func (scheduler *Scheduler) Listen() error
- func (scheduler *Scheduler) NewSchedule(s models.JobSchedule) (*Schedule, error)
- func (scheduler *Scheduler) NewWorker(id int, recheck bool) *Worker
- func (scheduler *Scheduler) Queue(detail Detail, scheduleID *uuid.UUID) (models.Job, error)
- func (scheduler *Scheduler) Schedule(cron string, detail Detail) (models.JobSchedule, error)
- func (scheduler *Scheduler) ScheduleOnce(at time.Time, detail Detail) (models.JobSchedule, error)
- type Worker
Constants ¶
View Source
const ( JobTypePostPublish = "post:publish" JobTypePostPublishTimelines = "post:publish:timelines" JobTypePostDelete = "post:delete" JobTypePostDeleteRevisions = "post:delete:revisions" JobTypePostDeleteReactions = "post:delete:reactions" JobTypePostDeleteTimelines = "post:delete:timelines" JobTypeProfileDelete = "profile:delete" JobTypeAccountDelete = "account:delete" JobTypeInstanceDelete = "instance:delete" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountDelete ¶
func (AccountDelete) Type ¶
func (AccountDelete) Type() string
type InstanceDelete ¶
func (InstanceDelete) Type ¶
func (InstanceDelete) Type() string
type PostDelete ¶
type PostDelete struct {
PostID uuid.UUID `json:"post_id"`
SkipSoftDelete bool `json:"skip_soft_delete"`
}
func (PostDelete) Type ¶
func (PostDelete) Type() string
type PostDeleteReactions ¶
func (PostDeleteReactions) Type ¶
func (PostDeleteReactions) Type() string
type PostDeleteRevisions ¶
func (PostDeleteRevisions) Type ¶
func (PostDeleteRevisions) Type() string
type PostDeleteTimelines ¶
func (PostDeleteTimelines) Type ¶
func (PostDeleteTimelines) Type() string
type PostPublish ¶
type PostPublish struct {
ProfileID uuid.UUID `json:"profile_id"`
Subject *string `json:"subject"`
Content string `json:"content"`
Tags []string `json:"tags"`
PollID *uuid.UUID `json:"poll_id"`
GroupIDs []uuid.UUID `json:"group_ids"`
FileIDs []uuid.UUID `json:"file_ids"`
DeleteAt *time.Time `json:"delete_at"`
// contains filtered or unexported fields
}
func (PostPublish) Type ¶
func (PostPublish) Type() string
type PostPublishTimelines ¶
func (PostPublishTimelines) Type ¶
func (PostPublishTimelines) Type() string
type ProfileDelete ¶
func (ProfileDelete) Type ¶
func (ProfileDelete) Type() string
type Schedule ¶
type Schedule struct {
models.JobSchedule
// contains filtered or unexported fields
}
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func (*Scheduler) AutoCleanupOldJobs ¶
func (*Scheduler) NewSchedule ¶
func (scheduler *Scheduler) NewSchedule(s models.JobSchedule) (*Schedule, error)
func (*Scheduler) ScheduleOnce ¶
Click to show internal directories.
Click to hide internal directories.