Manager: avoid logging an error when requesting a non-existent job
This is expected to happen every once in a while, especially now that Flamenco supports job deletion. It's not something to log at error level.
This commit is contained in:
parent
2927e82802
commit
bf0906eb95
@ -211,7 +211,8 @@ func (db *DB) StoreAuthoredJob(ctx context.Context, authoredJob job_compilers.Au
|
|||||||
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).
|
findResult := db.gormDB.WithContext(ctx).
|
||||||
First(&dbJob, "uuid = ?", jobUUID)
|
Limit(1).
|
||||||
|
Find(&dbJob, "uuid = ?", jobUUID)
|
||||||
if findResult.Error != nil {
|
if findResult.Error != nil {
|
||||||
return nil, jobError(findResult.Error, "fetching job")
|
return nil, jobError(findResult.Error, "fetching job")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user