Documentation ¶
Index ¶
- type AddWorkerToJobBlocklistParams
- type AddWorkerToTaskFailedListParams
- type AssignTaskToWorkerParams
- type CountTaskFailuresOfWorkerParams
- type CreateJobParams
- type CreateTaskParams
- type CreateWorkerParams
- type CreateWorkerTagParams
- type DBTX
- type FetchAssignedAndRunnableTaskOfWorkerParams
- type FetchAssignedAndRunnableTaskOfWorkerRow
- type FetchJobBlocklistRow
- type FetchTaskFailureListRow
- type FetchTaskRow
- type FetchTasksOfJobInStatusParams
- type FetchTasksOfJobInStatusRow
- type FetchTasksOfJobRow
- type FetchTasksOfWorkerInStatusOfJobParams
- type FetchTasksOfWorkerInStatusOfJobRow
- type FetchTasksOfWorkerInStatusParams
- type FetchTasksOfWorkerInStatusRow
- type FetchTimedOutTasksParams
- type FetchTimedOutWorkersParams
- type FetchWorkerTaskParams
- type FetchWorkerTaskRow
- type FetchWorkersRow
- type FindRunnableTaskParams
- type FindRunnableTaskRow
- type Job
- type JobBlock
- type JobCountTaskStatusesRow
- type JobCountTasksInStatusParams
- type LastRendered
- type PragmaForeignKeyCheckResult
- type PragmaIntegrityCheckResult
- type Queries
- func (q *Queries) AddWorkerToJobBlocklist(ctx context.Context, arg AddWorkerToJobBlocklistParams) error
- func (q *Queries) AddWorkerToTaskFailedList(ctx context.Context, arg AddWorkerToTaskFailedListParams) error
- func (q *Queries) AssignTaskToWorker(ctx context.Context, arg AssignTaskToWorkerParams) error
- func (q *Queries) ClearFailureListOfJob(ctx context.Context, jobID int64) error
- func (q *Queries) ClearFailureListOfTask(ctx context.Context, taskID int64) error
- func (q *Queries) ClearJobBlocklist(ctx context.Context, jobuuid string) error
- func (q *Queries) CountTaskFailuresOfWorker(ctx context.Context, arg CountTaskFailuresOfWorkerParams) (int64, error)
- func (q *Queries) CountWorkerTags(ctx context.Context) (int64, error)
- func (q *Queries) CountWorkersFailingTask(ctx context.Context, taskID int64) (int64, error)
- func (q *Queries) CreateJob(ctx context.Context, arg CreateJobParams) (int64, error)
- func (q *Queries) CreateTask(ctx context.Context, arg CreateTaskParams) (int64, error)
- func (q *Queries) CreateWorker(ctx context.Context, arg CreateWorkerParams) (int64, error)
- func (q *Queries) CreateWorkerTag(ctx context.Context, arg CreateWorkerTagParams) (int64, error)
- func (q *Queries) DeleteJob(ctx context.Context, uuid string) error
- func (q *Queries) DeleteWorkerTag(ctx context.Context, uuid string) (int64, error)
- func (q *Queries) FetchAssignedAndRunnableTaskOfWorker(ctx context.Context, arg FetchAssignedAndRunnableTaskOfWorkerParams) (FetchAssignedAndRunnableTaskOfWorkerRow, error)
- func (q *Queries) FetchJob(ctx context.Context, uuid string) (Job, error)
- func (q *Queries) FetchJobBlocklist(ctx context.Context, jobuuid string) ([]FetchJobBlocklistRow, error)
- func (q *Queries) FetchJobByID(ctx context.Context, id int64) (Job, error)
- func (q *Queries) FetchJobShamanCheckoutID(ctx context.Context, uuid string) (string, error)
- func (q *Queries) FetchJobUUIDsUpdatedBefore(ctx context.Context, updatedAtMax sql.NullTime) ([]string, error)
- func (q *Queries) FetchJobs(ctx context.Context) ([]Job, error)
- func (q *Queries) FetchJobsDeletionRequested(ctx context.Context) ([]string, error)
- func (q *Queries) FetchJobsInStatus(ctx context.Context, statuses []string) ([]Job, error)
- func (q *Queries) FetchSleepSchedulesToCheck(ctx context.Context, nextCheck sql.NullTime) ([]SleepSchedule, error)
- func (q *Queries) FetchTagsOfWorker(ctx context.Context, uuid string) ([]WorkerTag, error)
- func (q *Queries) FetchTask(ctx context.Context, uuid string) (FetchTaskRow, error)
- func (q *Queries) FetchTaskFailureList(ctx context.Context, taskID int64) ([]FetchTaskFailureListRow, error)
- func (q *Queries) FetchTaskJobUUID(ctx context.Context, uuid string) (sql.NullString, error)
- func (q *Queries) FetchTasksOfJob(ctx context.Context, jobID int64) ([]FetchTasksOfJobRow, error)
- func (q *Queries) FetchTasksOfJobInStatus(ctx context.Context, arg FetchTasksOfJobInStatusParams) ([]FetchTasksOfJobInStatusRow, error)
- func (q *Queries) FetchTasksOfWorkerInStatus(ctx context.Context, arg FetchTasksOfWorkerInStatusParams) ([]FetchTasksOfWorkerInStatusRow, error)
- func (q *Queries) FetchTasksOfWorkerInStatusOfJob(ctx context.Context, arg FetchTasksOfWorkerInStatusOfJobParams) ([]FetchTasksOfWorkerInStatusOfJobRow, error)
- func (q *Queries) FetchTimedOutTasks(ctx context.Context, arg FetchTimedOutTasksParams) ([]Task, error)
- func (q *Queries) FetchTimedOutWorkers(ctx context.Context, arg FetchTimedOutWorkersParams) ([]Worker, error)
- func (q *Queries) FetchWorker(ctx context.Context, uuid string) (Worker, error)
- func (q *Queries) FetchWorkerByID(ctx context.Context, workerID int64) (Worker, error)
- func (q *Queries) FetchWorkerSleepSchedule(ctx context.Context, workeruuid string) (SleepSchedule, error)
- func (q *Queries) FetchWorkerTagByID(ctx context.Context, workerTagID int64) (WorkerTag, error)
- func (q *Queries) FetchWorkerTagByUUID(ctx context.Context, uuid string) (WorkerTag, error)
- func (q *Queries) FetchWorkerTags(ctx context.Context) ([]WorkerTag, error)
- func (q *Queries) FetchWorkerTagsByUUIDs(ctx context.Context, uuids []string) ([]WorkerTag, error)
- func (q *Queries) FetchWorkerTask(ctx context.Context, arg FetchWorkerTaskParams) (FetchWorkerTaskRow, error)
- func (q *Queries) FetchWorkerUnconditional(ctx context.Context, uuid string) (Worker, error)
- func (q *Queries) FetchWorkerUnconditionalByID(ctx context.Context, workerID int64) (Worker, error)
- func (q *Queries) FetchWorkers(ctx context.Context) ([]FetchWorkersRow, error)
- func (q *Queries) FindRunnableTask(ctx context.Context, arg FindRunnableTaskParams) (FindRunnableTaskRow, error)
- func (q *Queries) GetLastRenderedJobUUID(ctx context.Context) (string, error)
- func (q *Queries) JobCountTaskStatuses(ctx context.Context, jobID int64) ([]JobCountTaskStatusesRow, error)
- func (q *Queries) JobCountTasksInStatus(ctx context.Context, arg JobCountTasksInStatusParams) (int64, error)
- func (q *Queries) PragmaBusyTimeout(ctx context.Context, busyTimeout time.Duration) error
- func (q *Queries) PragmaForeignKeyCheck(ctx context.Context) ([]PragmaForeignKeyCheckResult, error)
- func (q *Queries) PragmaForeignKeysGet(ctx context.Context) (bool, error)
- func (q *Queries) PragmaForeignKeysSet(ctx context.Context, enable bool) error
- func (q *Queries) PragmaIntegrityCheck(ctx context.Context) ([]PragmaIntegrityCheckResult, error)
- func (q *Queries) PragmaJournalModeWAL(ctx context.Context) error
- func (q *Queries) PragmaSynchronousNormal(ctx context.Context) error
- func (q *Queries) QueryJobTaskSummaries(ctx context.Context, jobUuid string) ([]QueryJobTaskSummariesRow, error)
- func (q *Queries) RemoveFromJobBlocklist(ctx context.Context, arg RemoveFromJobBlocklistParams) error
- func (q *Queries) RequestJobDeletion(ctx context.Context, arg RequestJobDeletionParams) error
- func (q *Queries) RequestMassJobDeletion(ctx context.Context, arg RequestMassJobDeletionParams) error
- func (q *Queries) SaveJobPriority(ctx context.Context, arg SaveJobPriorityParams) error
- func (q *Queries) SaveJobStatus(ctx context.Context, arg SaveJobStatusParams) error
- func (q *Queries) SaveJobStorageInfo(ctx context.Context, arg SaveJobStorageInfoParams) error
- func (q *Queries) SaveWorker(ctx context.Context, arg SaveWorkerParams) error
- func (q *Queries) SaveWorkerStatus(ctx context.Context, arg SaveWorkerStatusParams) error
- func (q *Queries) SaveWorkerTag(ctx context.Context, arg SaveWorkerTagParams) error
- func (q *Queries) SetLastRendered(ctx context.Context, arg SetLastRenderedParams) error
- func (q *Queries) SetWorkerSleepSchedule(ctx context.Context, arg SetWorkerSleepScheduleParams) (int64, error)
- func (q *Queries) SetWorkerSleepScheduleNextCheck(ctx context.Context, arg SetWorkerSleepScheduleNextCheckParams) (int64, error)
- func (q *Queries) SoftDeleteWorker(ctx context.Context, arg SoftDeleteWorkerParams) (int64, error)
- func (q *Queries) StoreTaskDependency(ctx context.Context, arg StoreTaskDependencyParams) error
- func (q *Queries) SummarizeJobStatuses(ctx context.Context) ([]SummarizeJobStatusesRow, error)
- func (q *Queries) SummarizeWorkerStatuses(ctx context.Context) ([]SummarizeWorkerStatusesRow, error)
- func (q *Queries) TaskAssignToWorker(ctx context.Context, arg TaskAssignToWorkerParams) error
- func (q *Queries) TaskTouchedByWorker(ctx context.Context, arg TaskTouchedByWorkerParams) error
- func (q *Queries) Test_CountJobs(ctx context.Context) (int64, error)
- func (q *Queries) Test_CountTaskFailures(ctx context.Context) (int64, error)
- func (q *Queries) Test_CountTasks(ctx context.Context) (int64, error)
- func (q *Queries) Test_CreateWorkerSleepSchedule(ctx context.Context, arg Test_CreateWorkerSleepScheduleParams) (int64, error)
- func (q *Queries) Test_FetchJobBlocklist(ctx context.Context) ([]JobBlock, error)
- func (q *Queries) Test_FetchLastRendered(ctx context.Context) ([]LastRendered, error)
- func (q *Queries) Test_FetchTaskFailures(ctx context.Context) ([]TaskFailure, error)
- func (q *Queries) UpdateJobsTaskStatuses(ctx context.Context, arg UpdateJobsTaskStatusesParams) error
- func (q *Queries) UpdateJobsTaskStatusesConditional(ctx context.Context, arg UpdateJobsTaskStatusesConditionalParams) error
- func (q *Queries) UpdateTask(ctx context.Context, arg UpdateTaskParams) error
- func (q *Queries) UpdateTaskActivity(ctx context.Context, arg UpdateTaskActivityParams) error
- func (q *Queries) UpdateTaskStatus(ctx context.Context, arg UpdateTaskStatusParams) error
- func (q *Queries) Vacuum(ctx context.Context) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- func (q *Queries) WorkerAddTagMembership(ctx context.Context, arg WorkerAddTagMembershipParams) error
- func (q *Queries) WorkerRemoveTagMemberships(ctx context.Context, workerID int64) error
- func (q *Queries) WorkerSeen(ctx context.Context, arg WorkerSeenParams) error
- func (q *Queries) WorkersLeftToRun(ctx context.Context, arg WorkersLeftToRunParams) ([]string, error)
- func (q *Queries) WorkersLeftToRunWithWorkerTag(ctx context.Context, arg WorkersLeftToRunWithWorkerTagParams) ([]string, error)
- type QueryJobTaskSummariesRow
- type RemoveFromJobBlocklistParams
- type RequestJobDeletionParams
- type RequestMassJobDeletionParams
- type SaveJobPriorityParams
- type SaveJobStatusParams
- type SaveJobStorageInfoParams
- type SaveWorkerParams
- type SaveWorkerStatusParams
- type SaveWorkerTagParams
- type SetLastRenderedParams
- type SetWorkerSleepScheduleNextCheckParams
- type SetWorkerSleepScheduleParams
- type SleepSchedule
- type SoftDeleteWorkerParams
- type StoreTaskDependencyParams
- type SummarizeJobStatusesRow
- type SummarizeWorkerStatusesRow
- type Task
- type TaskAssignToWorkerParams
- type TaskDependency
- type TaskFailure
- type TaskTouchedByWorkerParams
- type Test_CreateWorkerSleepScheduleParams
- type UpdateJobsTaskStatusesConditionalParams
- type UpdateJobsTaskStatusesParams
- type UpdateTaskActivityParams
- type UpdateTaskParams
- type UpdateTaskStatusParams
- type Worker
- type WorkerAddTagMembershipParams
- type WorkerSeenParams
- type WorkerTag
- type WorkerTagMembership
- type WorkersLeftToRunParams
- type WorkersLeftToRunWithWorkerTagParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateJobParams ¶
type CreateTaskParams ¶
type CreateWorkerParams ¶
type CreateWorkerTagParams ¶
type FetchAssignedAndRunnableTaskOfWorkerRow ¶
type FetchAssignedAndRunnableTaskOfWorkerRow struct {
Task Task
}
type FetchJobBlocklistRow ¶
type FetchTaskFailureListRow ¶
type FetchTaskFailureListRow struct {
Worker Worker
}
type FetchTaskRow ¶
type FetchTaskRow struct { Task Task JobUUID sql.NullString WorkerUUID sql.NullString }
type FetchTasksOfJobInStatusRow ¶
type FetchTasksOfJobInStatusRow struct { Task Task WorkerUUID sql.NullString }
type FetchTasksOfJobRow ¶
type FetchTasksOfJobRow struct { Task Task WorkerUUID sql.NullString }
type FetchTasksOfWorkerInStatusOfJobRow ¶
type FetchTasksOfWorkerInStatusOfJobRow struct {
Task Task
}
type FetchTasksOfWorkerInStatusRow ¶
type FetchTasksOfWorkerInStatusRow struct { Task Task JobUUID sql.NullString }
type FetchWorkerTaskParams ¶
type FetchWorkerTaskRow ¶
type FetchWorkersRow ¶
type FetchWorkersRow struct {
Worker Worker
}
type FindRunnableTaskParams ¶
type FindRunnableTaskRow ¶
type FindRunnableTaskRow struct {
Task Task
}
type JobCountTaskStatusesRow ¶
type LastRendered ¶
type PragmaIntegrityCheckResult ¶
type PragmaIntegrityCheckResult struct {
Description string
}
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddWorkerToJobBlocklist ¶
func (q *Queries) AddWorkerToJobBlocklist(ctx context.Context, arg AddWorkerToJobBlocklistParams) error
Add a worker to a job's blocklist.
func (*Queries) AddWorkerToTaskFailedList ¶
func (q *Queries) AddWorkerToTaskFailedList(ctx context.Context, arg AddWorkerToTaskFailedListParams) error
func (*Queries) AssignTaskToWorker ¶
func (q *Queries) AssignTaskToWorker(ctx context.Context, arg AssignTaskToWorkerParams) error
func (*Queries) ClearFailureListOfJob ¶
SQLite doesn't support JOIN in DELETE queries, so use a sub-query instead.
func (*Queries) ClearFailureListOfTask ¶
func (*Queries) ClearJobBlocklist ¶
func (*Queries) CountTaskFailuresOfWorker ¶
func (*Queries) CountWorkerTags ¶
func (*Queries) CountWorkersFailingTask ¶
Count how many workers have failed a given task.
func (*Queries) CreateTask ¶
func (*Queries) CreateWorker ¶
func (*Queries) CreateWorkerTag ¶
func (*Queries) DeleteWorkerTag ¶
func (*Queries) FetchAssignedAndRunnableTaskOfWorker ¶
func (q *Queries) FetchAssignedAndRunnableTaskOfWorker(ctx context.Context, arg FetchAssignedAndRunnableTaskOfWorkerParams) (FetchAssignedAndRunnableTaskOfWorkerRow, error)
Fetch a task that's assigned to this worker, and is in a runnable state.
func (*Queries) FetchJobBlocklist ¶
func (*Queries) FetchJobByID ¶
Fetch a job by its numerical ID.
func (*Queries) FetchJobShamanCheckoutID ¶
func (*Queries) FetchJobUUIDsUpdatedBefore ¶
func (*Queries) FetchJobsDeletionRequested ¶
func (*Queries) FetchJobsInStatus ¶
func (*Queries) FetchSleepSchedulesToCheck ¶
func (*Queries) FetchTagsOfWorker ¶
func (*Queries) FetchTaskFailureList ¶
func (*Queries) FetchTaskJobUUID ¶
func (*Queries) FetchTasksOfJob ¶
func (*Queries) FetchTasksOfJobInStatus ¶
func (q *Queries) FetchTasksOfJobInStatus(ctx context.Context, arg FetchTasksOfJobInStatusParams) ([]FetchTasksOfJobInStatusRow, error)
func (*Queries) FetchTasksOfWorkerInStatus ¶
func (q *Queries) FetchTasksOfWorkerInStatus(ctx context.Context, arg FetchTasksOfWorkerInStatusParams) ([]FetchTasksOfWorkerInStatusRow, error)
func (*Queries) FetchTasksOfWorkerInStatusOfJob ¶
func (q *Queries) FetchTasksOfWorkerInStatusOfJob(ctx context.Context, arg FetchTasksOfWorkerInStatusOfJobParams) ([]FetchTasksOfWorkerInStatusOfJobRow, error)
func (*Queries) FetchTimedOutTasks ¶
func (*Queries) FetchTimedOutWorkers ¶
func (*Queries) FetchWorker ¶
FetchWorker only returns the worker if it wasn't soft-deleted.
func (*Queries) FetchWorkerByID ¶
FetchWorkerByID only returns the worker if it wasn't soft-deleted.
func (*Queries) FetchWorkerSleepSchedule ¶
func (*Queries) FetchWorkerTagByID ¶
func (*Queries) FetchWorkerTagByUUID ¶
func (*Queries) FetchWorkerTags ¶
func (*Queries) FetchWorkerTagsByUUIDs ¶
func (*Queries) FetchWorkerTask ¶
func (q *Queries) FetchWorkerTask(ctx context.Context, arg FetchWorkerTaskParams) (FetchWorkerTaskRow, error)
Find the currently-active task assigned to a Worker. If not found, find the last task this Worker worked on.
func (*Queries) FetchWorkerUnconditional ¶
FetchWorkerUnconditional ignores soft-deletion status and just returns the worker.
func (*Queries) FetchWorkerUnconditionalByID ¶
FetchWorkerUnconditional ignores soft-deletion status and just returns the worker.
func (*Queries) FetchWorkers ¶
func (q *Queries) FetchWorkers(ctx context.Context) ([]FetchWorkersRow, error)
func (*Queries) FindRunnableTask ¶
func (q *Queries) FindRunnableTask(ctx context.Context, arg FindRunnableTaskParams) (FindRunnableTaskRow, error)
Find a task to be run by a worker. This is the core of the task scheduler.
Note that this query doesn't check for the assigned worker. Tasks that have a 'schedulable' status might have been assigned to a worker, representing the last worker to touch it -- it's not meant to indicate "ownership" of the task.
The order in the WHERE clause is important, slices should come last. See https://github.com/sqlc-dev/sqlc/issues/2452 for more info.
func (*Queries) GetLastRenderedJobUUID ¶
func (*Queries) JobCountTaskStatuses ¶
func (q *Queries) JobCountTaskStatuses(ctx context.Context, jobID int64) ([]JobCountTaskStatusesRow, error)
Fetch (status, num tasks in that status) rows for the given job.
func (*Queries) JobCountTasksInStatus ¶
func (q *Queries) JobCountTasksInStatus(ctx context.Context, arg JobCountTasksInStatusParams) (int64, error)
Fetch number of tasks in the given status, of the given job.
func (*Queries) PragmaBusyTimeout ¶
func (*Queries) PragmaForeignKeyCheck ¶
func (q *Queries) PragmaForeignKeyCheck(ctx context.Context) ([]PragmaForeignKeyCheckResult, error)
func (*Queries) PragmaForeignKeysGet ¶
func (*Queries) PragmaForeignKeysSet ¶
func (*Queries) PragmaIntegrityCheck ¶
func (q *Queries) PragmaIntegrityCheck(ctx context.Context) ([]PragmaIntegrityCheckResult, error)
func (*Queries) PragmaJournalModeWAL ¶
func (*Queries) PragmaSynchronousNormal ¶
func (*Queries) QueryJobTaskSummaries ¶
func (*Queries) RemoveFromJobBlocklist ¶
func (q *Queries) RemoveFromJobBlocklist(ctx context.Context, arg RemoveFromJobBlocklistParams) error
func (*Queries) RequestJobDeletion ¶
func (q *Queries) RequestJobDeletion(ctx context.Context, arg RequestJobDeletionParams) error
func (*Queries) RequestMassJobDeletion ¶
func (q *Queries) RequestMassJobDeletion(ctx context.Context, arg RequestMassJobDeletionParams) error
func (*Queries) SaveJobPriority ¶
func (q *Queries) SaveJobPriority(ctx context.Context, arg SaveJobPriorityParams) error
func (*Queries) SaveJobStatus ¶
func (q *Queries) SaveJobStatus(ctx context.Context, arg SaveJobStatusParams) error
func (*Queries) SaveJobStorageInfo ¶
func (q *Queries) SaveJobStorageInfo(ctx context.Context, arg SaveJobStorageInfoParams) error
func (*Queries) SaveWorker ¶
func (q *Queries) SaveWorker(ctx context.Context, arg SaveWorkerParams) error
func (*Queries) SaveWorkerStatus ¶
func (q *Queries) SaveWorkerStatus(ctx context.Context, arg SaveWorkerStatusParams) error
func (*Queries) SaveWorkerTag ¶
func (q *Queries) SaveWorkerTag(ctx context.Context, arg SaveWorkerTagParams) error
func (*Queries) SetLastRendered ¶
func (q *Queries) SetLastRendered(ctx context.Context, arg SetLastRenderedParams) error
Set the 'last rendered' job info.
Note that the use of ?2 and ?3 in the SQL is not desirable, and should be replaced with @updated_at and @job_id as soon as sqlc issue #3334 is fixed. See https://github.com/sqlc-dev/sqlc/issues/3334 for more info.
func (*Queries) SetWorkerSleepSchedule ¶
func (q *Queries) SetWorkerSleepSchedule(ctx context.Context, arg SetWorkerSleepScheduleParams) (int64, error)
Note that the use of ?2 and ?3 in the SQL is not desirable, and should be replaced with @updated_at and @job_id as soon as sqlc issue #3334 is fixed. See https://github.com/sqlc-dev/sqlc/issues/3334 for more info.
func (*Queries) SetWorkerSleepScheduleNextCheck ¶
func (*Queries) SoftDeleteWorker ¶
func (*Queries) StoreTaskDependency ¶
func (q *Queries) StoreTaskDependency(ctx context.Context, arg StoreTaskDependencyParams) error
func (*Queries) SummarizeJobStatuses ¶
func (q *Queries) SummarizeJobStatuses(ctx context.Context) ([]SummarizeJobStatusesRow, error)
func (*Queries) SummarizeWorkerStatuses ¶
func (q *Queries) SummarizeWorkerStatuses(ctx context.Context) ([]SummarizeWorkerStatusesRow, error)
func (*Queries) TaskAssignToWorker ¶
func (q *Queries) TaskAssignToWorker(ctx context.Context, arg TaskAssignToWorkerParams) error
func (*Queries) TaskTouchedByWorker ¶
func (q *Queries) TaskTouchedByWorker(ctx context.Context, arg TaskTouchedByWorkerParams) error
func (*Queries) Test_CountJobs ¶
Count the number of jobs in the database. Only used in unit tests.
func (*Queries) Test_CountTaskFailures ¶
Count the number of task failures in the database. Only used in unit tests.
func (*Queries) Test_CountTasks ¶
Count the number of tasks in the database. Only used in unit tests.
func (*Queries) Test_CreateWorkerSleepSchedule ¶
func (*Queries) Test_FetchJobBlocklist ¶
Fetch all job block list entries. Used only in unit tests.
func (*Queries) Test_FetchLastRendered ¶
func (q *Queries) Test_FetchLastRendered(ctx context.Context) ([]LastRendered, error)
Fetch all 'last rendered' in the database (even though there should only be one at most). Only used in unit tests.
func (*Queries) Test_FetchTaskFailures ¶
func (q *Queries) Test_FetchTaskFailures(ctx context.Context) ([]TaskFailure, error)
Fetch all task failures in the database. Only used in unit tests.
func (*Queries) UpdateJobsTaskStatuses ¶
func (q *Queries) UpdateJobsTaskStatuses(ctx context.Context, arg UpdateJobsTaskStatusesParams) error
func (*Queries) UpdateJobsTaskStatusesConditional ¶
func (q *Queries) UpdateJobsTaskStatusesConditional(ctx context.Context, arg UpdateJobsTaskStatusesConditionalParams) error
func (*Queries) UpdateTask ¶
func (q *Queries) UpdateTask(ctx context.Context, arg UpdateTaskParams) error
Update a Task, except its id, created_at, uuid, or job_id fields.
func (*Queries) UpdateTaskActivity ¶
func (q *Queries) UpdateTaskActivity(ctx context.Context, arg UpdateTaskActivityParams) error
func (*Queries) UpdateTaskStatus ¶
func (q *Queries) UpdateTaskStatus(ctx context.Context, arg UpdateTaskStatusParams) error
func (*Queries) WorkerAddTagMembership ¶
func (q *Queries) WorkerAddTagMembership(ctx context.Context, arg WorkerAddTagMembershipParams) error
func (*Queries) WorkerRemoveTagMemberships ¶
func (*Queries) WorkerSeen ¶
func (q *Queries) WorkerSeen(ctx context.Context, arg WorkerSeenParams) error
func (*Queries) WorkersLeftToRun ¶
func (*Queries) WorkersLeftToRunWithWorkerTag ¶
type SaveJobPriorityParams ¶
type SaveJobStatusParams ¶
type SaveWorkerParams ¶
type SaveWorkerStatusParams ¶
type SaveWorkerTagParams ¶
type SetLastRenderedParams ¶
type SleepSchedule ¶
type SoftDeleteWorkerParams ¶
type SummarizeJobStatusesRow ¶
type TaskDependency ¶
type UpdateTaskParams ¶
type UpdateTaskStatusParams ¶
type Worker ¶
type Worker struct { ID int64 CreatedAt time.Time UpdatedAt sql.NullTime UUID string Secret string Name string Address string Platform string Software string Status string LastSeenAt sql.NullTime StatusRequested string LazyStatusRequest bool SupportedTaskTypes string DeletedAt sql.NullTime CanRestart bool }