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/master.go | 3 ++- proc/single.go | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/proc/master.go b/proc/master.go index ddc9d1e..7c69c0a 100644 --- a/proc/master.go +++ b/proc/master.go @@ -13,7 +13,7 @@ } // MasterRole master -func MasterRole(ctx context.Context) { +func MasterRole(ctx context.Context) bool { reaper(ctx) util.InitDBAPI() @@ -35,4 +35,5 @@ } logo.Infof("START %d PROC %d SDK %s ID %s\n", k, pid, v.IpcId, v.SdkType) } + return true } 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