コード例 #1
0
 private static void ProcessList(string listId, string lockKey, ServiceStack.Redis.IRedisClient redisClient, string messageId)
 {
     using (redisClient.AcquireLock(lockKey, TimeSpan.FromMinutes(lockTime)))
     {
         if (redisClient.GetItemFromList(listId, 0) == messageId)
         {
             if (redisClient.RemoveStartFromList(listId) != messageId)
             {
                 throw new Exception("Neuskutocnitelne sa stalo !");
             }
         }
     }
 }