Cleanup: Manager, add bit of documentation
This commit is contained in:
parent
9b330280b7
commit
bb68488c5e
@ -38,6 +38,7 @@ var _ api.ServerInterface = (*Flamenco)(nil)
|
|||||||
|
|
||||||
type PersistenceService interface {
|
type PersistenceService interface {
|
||||||
StoreAuthoredJob(ctx context.Context, authoredJob job_compilers.AuthoredJob) error
|
StoreAuthoredJob(ctx context.Context, authoredJob job_compilers.AuthoredJob) error
|
||||||
|
// FetchJob fetches a single job, without fetching its tasks.
|
||||||
FetchJob(ctx context.Context, jobID string) (*persistence.Job, error)
|
FetchJob(ctx context.Context, jobID string) (*persistence.Job, error)
|
||||||
// FetchTask fetches the given task and the accompanying job.
|
// FetchTask fetches the given task and the accompanying job.
|
||||||
FetchTask(ctx context.Context, taskID string) (*persistence.Task, error)
|
FetchTask(ctx context.Context, taskID string) (*persistence.Task, error)
|
||||||
|
@ -169,6 +169,7 @@ func (db *DB) StoreAuthoredJob(ctx context.Context, authoredJob job_compilers.Au
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FetchJob fetches a single job, without fetching its tasks.
|
||||||
func (db *DB) FetchJob(ctx context.Context, jobUUID string) (*Job, error) {
|
func (db *DB) FetchJob(ctx context.Context, jobUUID string) (*Job, error) {
|
||||||
dbJob := Job{}
|
dbJob := Job{}
|
||||||
findResult := db.gormDB.WithContext(ctx).First(&dbJob, "uuid = ?", jobUUID)
|
findResult := db.gormDB.WithContext(ctx).First(&dbJob, "uuid = ?", jobUUID)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user