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:
Sybren A. Stüvel 2023-02-03 16:36:53 +01:00
parent 2927e82802
commit bf0906eb95

View File

@ -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) {
dbJob := Job{}
findResult := db.gormDB.WithContext(ctx).
First(&dbJob, "uuid = ?", jobUUID)
Limit(1).
Find(&dbJob, "uuid = ?", jobUUID)
if findResult.Error != nil {
return nil, jobError(findResult.Error, "fetching job")
}