| | |
| | | f.fnLogger("Face No Running: ", f.rebootUntil) |
| | | if f.rebootUntil > maxTryBeforeReboot { |
| | | f.fnLogger("Face Too Long Running, Reboot") |
| | | f.release() |
| | | os.Exit(0) |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | func (f *face) release() { |
| | | if f.handle != nil { |
| | | f.handle.Free() |
| | | } |
| | | } |
| | | |
| | | // Run run |
| | | func Run(ctx context.Context, i interface{}) { |
| | | s := i.(*face) |
| | |
| | | ) |
| | | ipcRcv := sdkhelper.GetIpcAddress(s.shm, s.id+postPull) |
| | | ipcSnd := sdkhelper.GetIpcAddress(s.shm, s.id+postPush) |
| | | chRcv := make(chan []byte) |
| | | chSnd := make(chan sdkstruct.MsgSDK) |
| | | chRcv := make(chan []byte, 3) |
| | | chSnd := make(chan sdkstruct.MsgSDK, 3) |
| | | |
| | | rcver := sdkhelper.NewReciever(ipcRcv, chRcv, s.shm, s.fnLogger) |
| | | snder := sdkhelper.NewSender(ipcSnd, chSnd, s.shm, s.fnLogger) |