18790: Error out instead of retrying if server is too old.
[arvados.git] / lib / controller / localdb / container.go
index ad1da6e13010f4bbc9555e410c258ee9ae0737ff..52a3974aa1c37806bb77e5ba4907a045c493f461 100644 (file)
@@ -107,6 +107,7 @@ func (conn *Conn) containerPriorityUpdate(ctx context.Context, log logrus.FieldL
                        WHERE containers.state IN ('Queued', 'Locked', 'Running')
                         AND containers.priority = 0
                         AND (parent.uuid IS NULL OR parent.priority > 0)
+                       ORDER BY containers.created_at
                        LIMIT 1`).Scan(&uuid)
                if err == sql.ErrNoRows {
                        break