private void WriteRedis()
 {
     while (redislist.Count > 0)
     {
         try
         {
             RedisQueue redisinfo = redislist.Dequeue();
             Task.Run(() =>
             {
                 SeRedisHelper.StringSet(redisinfo.key, Convert.ToBase64String(redisinfo.bytes));
             });
         }
         catch (Exception e)
         {
             Log4Helper.WriteLog(e.ToString());
         }
     }
 }
        public static void AddQueue(string maptype, string x, string y, string z, byte[] bytes)
        {
            TileQueueInfo tilequeueinfo = new TileQueueInfo();

            tilequeueinfo.maptype = maptype;
            tilequeueinfo.x       = x;
            tilequeueinfo.y       = y;
            tilequeueinfo.z       = z;
            tilequeueinfo.bytes   = bytes;
            listqueue.Enqueue(tilequeueinfo);

            if (Redisbool.ToUpper() == "TRUE")
            {
                RedisQueue redisqueue = new RedisQueue();
                redisqueue.key   = maptype + "-" + JsonHelper.GetValueByKey(maptype).version + "-" + z + "-" + x + "-" + y;
                redisqueue.bytes = bytes;
                redislist.Enqueue(redisqueue);
            }
        }