migrations

package
v5.10.2-rc1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2019 License: AGPL-3.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MIGRATION_STATE_UNSCHEDULED = "unscheduled"
	MIGRATION_STATE_IN_PROGRESS = "in_progress"
	MIGRATION_STATE_COMPLETED   = "completed"

	JOB_DATA_KEY_MIGRATION           = "migration_key"
	JOB_DATA_KEY_MIGRATION_LAST_DONE = "last_done"
)
View Source
const (
	MIGRATION_JOB_WEDGED_TIMEOUT_MILLISECONDS = 3600000 // 1 hour
)
View Source
const (
	TIME_BETWEEN_BATCHES = 100
)

Variables

This section is empty.

Functions

func GetMigrationState

func GetMigrationState(migration string, store store.Store) (string, *model.Job, *model.AppError)

func MakeMigrationsList

func MakeMigrationsList() []string

Types

type AdvancedPermissionsPhase2Progress

type AdvancedPermissionsPhase2Progress struct {
	CurrentTable  string `json:"current_table"`
	LastTeamId    string `json:"last_team_id"`
	LastChannelId string `json:"last_channel_id"`
	LastUserId    string `json:"last_user"`
}

func AdvancedPermissionsPhase2ProgressFromJson

func AdvancedPermissionsPhase2ProgressFromJson(data io.Reader) *AdvancedPermissionsPhase2Progress

func (*AdvancedPermissionsPhase2Progress) IsValid

func (*AdvancedPermissionsPhase2Progress) ToJson

type MigrationsJobInterfaceImpl

type MigrationsJobInterfaceImpl struct {
	App *app.App
}

func (*MigrationsJobInterfaceImpl) MakeScheduler

func (m *MigrationsJobInterfaceImpl) MakeScheduler() model.Scheduler

func (*MigrationsJobInterfaceImpl) MakeWorker

func (m *MigrationsJobInterfaceImpl) MakeWorker() model.Worker

type Scheduler

type Scheduler struct {
	App *app.App
	// contains filtered or unexported fields
}

func (*Scheduler) Enabled

func (scheduler *Scheduler) Enabled(cfg *model.Config) bool

func (*Scheduler) JobType

func (scheduler *Scheduler) JobType() string

func (*Scheduler) Name

func (scheduler *Scheduler) Name() string

func (*Scheduler) NextScheduleTime

func (scheduler *Scheduler) NextScheduleTime(cfg *model.Config, now time.Time, pendingJobs bool, lastSuccessfulJob *model.Job) *time.Time

func (*Scheduler) ScheduleJob

func (scheduler *Scheduler) ScheduleJob(cfg *model.Config, pendingJobs bool, lastSuccessfulJob *model.Job) (*model.Job, *model.AppError)

type Worker

type Worker struct {
	// contains filtered or unexported fields
}

func (*Worker) DoJob

func (worker *Worker) DoJob(job *model.Job)

func (*Worker) JobChannel

func (worker *Worker) JobChannel() chan<- model.Job

func (*Worker) Run

func (worker *Worker) Run()

func (*Worker) Stop

func (worker *Worker) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL