Exemple #1
0
        /// <summary>
        /// Disposable impl. Handles cleanup and marks any uncompleted tasks as failed.
        /// </summary>
        public void Dispose()
        {
            // the consumer did not assert the task was succesfully completed,
            // or something sinister has happened. Add the task to the failed tasks list.
            if (State == RedisQueueState.TaskReserved && !LocalCachingEnabled)
            {
                Fail("RedisClient disposed prior to the task being completed.");
            }

            TypedClient.Dispose();
            GenericClient.Dispose();

            Log.Info("Disconnected from Redis.");
            Log.DebugFormat("Client state on disconnect: {0}", State);
        }