Commit 06447292 authored by hongguangwu's avatar hongguangwu

1.7.21-优化

parent cbefb499
......@@ -205,11 +205,11 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
// 此方法是:删除临时文件
public void cleanSpireTempFiles() {
try {
// 暂停1分钟
try {
// 暂停1分钟:不暂停,删10分钟前的数据
/*try {
Thread.sleep(60000);
} catch (InterruptedException e) {
}
}*/
String tempDirPath = System.getProperty("java.io.tmpdir");
File tempDir = new File(tempDirPath);
......@@ -222,7 +222,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
if (spireTempFiles != null && spireTempFiles.length > 0) {
int count = 0;
long totalSize = 0;
long oneMinuteAgo = System.currentTimeMillis() - 60000;
// 删30分钟前的数据
long oneMinuteAgo = System.currentTimeMillis() - 30L * 60 * 1000;
long fileSize;
for (File file : spireTempFiles) {
if (file.isFile() && file.canWrite()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment