From 38ef62470f012920f4fc689681b4aedb8b2eb36b Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Tue, 19 Jul 2022 18:32:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/repo/cloudbrain.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/routers/repo/cloudbrain.go b/routers/repo/cloudbrain.go index 31bf1b887..0d20f83f0 100755 --- a/routers/repo/cloudbrain.go +++ b/routers/repo/cloudbrain.go @@ -731,6 +731,15 @@ func cloudBrainShow(ctx *context.Context, tpName base.TplName, jobType models.Jo ctx.Data["resource_type"] = resourceType.Value } } + for _, specialPool := range cloudbrain.SpecialPools.Pools { + + for _, resourceType := range specialPool.Pool { + if resourceType.Queue == jobRes.Config.GpuType { + ctx.Data["resource_type"] = resourceType.Value + } + } + } + } else if task.JobType == string(models.JobTypeInference) { if inferenceGpuInfos == nil { json.Unmarshal([]byte(setting.InferenceGpuTypes), &inferenceGpuInfos) From eeea057bd8c3e0dbb46f513057798c6e8c0f6ec0 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Tue, 19 Jul 2022 18:34:04 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/custom_migrations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/custom_migrations.go b/models/custom_migrations.go index 041c4fb93..29c43b29a 100755 --- a/models/custom_migrations.go +++ b/models/custom_migrations.go @@ -17,7 +17,7 @@ type CustomMigrationStatic struct { var customMigrations = []CustomMigration{ //手机号功能可以不启用,不启用时手机号为空串,为了避免启用时唯一性约束报错,定制唯一性约束(对null和空字符串不做唯一性检查) - {"set phone number unique index", setPhoneNumberUniqueIndex}, + //{"set phone number unique index", setPhoneNumberUniqueIndex}, } var customMigrationsStatic []CustomMigrationStatic From 62ea71cb3a1258ffae670d98062e90d598031537 Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Tue, 19 Jul 2022 18:40:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- models/custom_migrations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/custom_migrations.go b/models/custom_migrations.go index 29c43b29a..041c4fb93 100755 --- a/models/custom_migrations.go +++ b/models/custom_migrations.go @@ -17,7 +17,7 @@ type CustomMigrationStatic struct { var customMigrations = []CustomMigration{ //手机号功能可以不启用,不启用时手机号为空串,为了避免启用时唯一性约束报错,定制唯一性约束(对null和空字符串不做唯一性检查) - //{"set phone number unique index", setPhoneNumberUniqueIndex}, + {"set phone number unique index", setPhoneNumberUniqueIndex}, } var customMigrationsStatic []CustomMigrationStatic