Exemplo n.º 1
0
        private async Task Generate(string userId, string courseName, string courseYear, string problemId, string action)
        {
            var ccData = _submitSolutionService
                         .CreateItemGenerateInputOutput(userId, courseName, courseYear, problemId, action);

            var attemptId = ccData.Id;
            var attemptNo = ccData.Attempt;

            _idService.RemeberClient(Clients.Caller, attemptId);
            await Clients.Clients(_idService[ccData.UserOrGroupUsers]).ServerMessageToClient("info", "Job submitted");

            _dbService.Data.Add(ccData);

            var itemsCount = await _dbService.Data.CountDocumentsAsync(i => i.Result.Status == ProcessStatus.InQueue.Value);

            await Clients.All.QueueStatus(new string[itemsCount]);
        }