bgtasks

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitBgTasks

func InitBgTasks(redisHost string, redisPort int, concurrency uint, codeboxInstanceId string) error

func StopWorkspace added in v0.0.47

func StopWorkspace(workspace *models.Workspace, skipErrors bool) error

Types

type Context

type Context struct {
	WorkspaceID uint
}

func (*Context) DeleteRunnerTask added in v0.0.47

func (jobContext *Context) DeleteRunnerTask(job *work.Job) error

Delete a runner: - stop all workspaces running on this runner (ignoring errors) - set workspace runner as nil - delete the runner

func (*Context) DeleteUserTask added in v0.0.47

func (jobContext *Context) DeleteUserTask(job *work.Job) error

Background task that deletes a user, this task deletes the user and all his workspaces

func (*Context) DeleteWorkspaceTask added in v0.0.47

func (jobContext *Context) DeleteWorkspaceTask(job *work.Job) error

func (*Context) PingAgentsTask added in v0.0.47

func (jobContext *Context) PingAgentsTask(job *work.Job) error

func (*Context) PingRunnersTask added in v0.0.47

func (jobContext *Context) PingRunnersTask(job *work.Job) error

func (*Context) StartWorkspaceTask added in v0.0.47

func (jobContext *Context) StartWorkspaceTask(job *work.Job) error

func (*Context) StopWorkspaceTask added in v0.0.47

func (jobContext *Context) StopWorkspaceTask(job *work.Job) error

func (*Context) UpdateWorkspaceConfigFilesTask added in v0.0.47

func (jobContext *Context) UpdateWorkspaceConfigFilesTask(job *work.Job) error

type EnqueuerInterface added in v0.0.47

type EnqueuerInterface interface {
	Enqueue(jobName string, args map[string]interface{}) (*work.Job, error)
}
var (
	BgTasksEnqueuer EnqueuerInterface
)

Jump to

Keyboard shortcuts

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