Пример #1
0
        public ActionResult TrainGroupStatus(string id, string db, string groupId)
        {
            var result = FaceService.GetPersonGroupTrainingStatus(groupId);

            if (result == null)
            {
                return(Json(new { status = "failed", message = "bad group id" }));
            }

            if (result.Status == Status.Succeeded || result.Status == Status.Failed)
            {
                PersonGroupService.SetPersonGroupTrainingResult(new ID(id), db, result);
            }

            return(Json(new
            {
                status = result.Status.ToString(),
                message = result.Message
            }));
        }