void ClearQC() { ClassLoger.Info("ClearQCPicJob.ClearQC", "定时清理图片文件任务启动"); string key = CacheKey.GetQrCodeKey(DateTime.Now.AddDays(-1)); if (RedisBase.ContainsKey(key)) { int i = 0; while (IsWork) { List <string> qcimageList = RedisBase.List_GetList <string>(key, i, 1000); foreach (string pathStr in qcimageList) { try { if (File.Exists(pathStr)) { File.Delete(pathStr); } } catch (Exception ex) { } } i++; if (qcimageList == null || qcimageList.Count == 0) { break; } } RedisBase.List_RemoveAll <string>(key); } ClassLoger.Info("ClearQCPicJob.ClearQC", "图片文件清理完毕"); }