From d6dc2a8f47c653c2cd002c35ed5b8360bdc7a863 Mon Sep 17 00:00:00 2001 From: zhangmeng <775834166@qq.com> Date: 星期四, 12 十二月 2019 10:38:05 +0800 Subject: [PATCH] update --- proc/single.go | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/proc/single.go b/proc/single.go index bb2c730..42d15b8 100644 --- a/proc/single.go +++ b/proc/single.go @@ -8,19 +8,20 @@ ) // SingleRole 鍗曡繘绋� -func SingleRole(ctx context.Context, typ string, ipcID string, gpu int, shm bool) { +func SingleRole(ctx context.Context, typ string, ipcID string, gpu int, shm bool) bool { util.InitDBAPI() + ret := false if typ == util.FeatAll { // run all proc per proc - allProc(ctx, gpu, shm) + ret = allProc(ctx, gpu, shm) } else if typ == util.FeatFace || typ == util.FeatYolo { // run all face sdk - sdkProc(ctx, typ, gpu, shm) + ret = sdkProc(ctx, typ, gpu, shm) } else { // run one sdk per proc, typ is facedetect/yolodetect/facecompare etc. id is ipc - slaveProc(ctx, typ, ipcID, gpu, shm) + ret = slaveProc(ctx, typ, ipcID, gpu, shm) } - + return ret } func sdkProc(ctx context.Context, typ string, gpu int, shm bool) { -- Gitblit v1.8.0