Commit 7b2e1d3c authored by hongguangwu's avatar hongguangwu

1.7.21-删10分钟前的数据

parent bc2d7eca
...@@ -205,11 +205,11 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -205,11 +205,11 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
// 此方法是:删除临时文件 // 此方法是:删除临时文件
public void cleanSpireTempFiles() { public void cleanSpireTempFiles() {
try { try {
// 暂停1分钟 // 暂停1分钟:不暂停,删10分钟前的数据
try { /*try {
Thread.sleep(60000); Thread.sleep(60000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
} }*/
String tempDirPath = System.getProperty("java.io.tmpdir"); String tempDirPath = System.getProperty("java.io.tmpdir");
File tempDir = new File(tempDirPath); File tempDir = new File(tempDirPath);
...@@ -222,7 +222,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -222,7 +222,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
if (spireTempFiles != null && spireTempFiles.length > 0) { if (spireTempFiles != null && spireTempFiles.length > 0) {
int count = 0; int count = 0;
long totalSize = 0; long totalSize = 0;
long oneMinuteAgo = System.currentTimeMillis() - 60000; long oneMinuteAgo = System.currentTimeMillis() - 600000;
long fileSize; long fileSize;
for (File file : spireTempFiles) { for (File file : spireTempFiles) {
if (file.isFile() && file.canWrite()) { 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