Пример #1
0
        /// <summary>
        /// Get a job from the current pending jobs in the handlers
        /// </summary>
        public Job GetJob(Guid clientId)
        {
            var clientInfo = _knownClients[clientId];

            Logger.Info(entry => entry.SetClientId(clientId), "'{0}' requested a job", clientInfo.ClientInfo.Name);
            var job = _handlerManager.GetJob(clientInfo);

            if (job != null)
            {
                // Update statistics
                _knownClients[clientId].JobsInProgress++;
            }
            return(job);
        }
Пример #2
0
        /// <summary>
        /// Get a job from the current pending jobs in the handlers
        /// </summary>
        public Job GetJob(Guid clientId)
        {
            var clientInfo = _clientManager.GetOrCreate(clientId);

            Logger.Debug(entry => entry.SetClientId(clientId), "'{0}' requested a job", clientInfo.ClientInfo.Name);
            var job = _handlerManager.GetJob(clientInfo);

            if (job != null)
            {
                // Update statistics
                clientInfo.JobsInProgress++;
            }
            return(job);
        }