use of io.vertigo.commons.daemon.DaemonScheduled in project vertigo by KleeGroup.
the class FileManagerImpl method deleteOldFiles.
/**
* Daemon for deleting old files.
*/
@DaemonScheduled(name = "DMN_PRUGE_TEMP_FILE", periodInSeconds = 5 * 60)
public void deleteOldFiles() {
final File documentRootFile = new File(TempFile.VERTIGO_TMP_DIR_PATH);
final long maxTime = System.currentTimeMillis() - purgeDelayMinutesOpt.orElse(60) * 60L * 1000L;
doDeleteOldFiles(documentRootFile, maxTime);
}
use of io.vertigo.commons.daemon.DaemonScheduled in project vertigo by KleeGroup.
the class FsFullFileStorePlugin method deleteOldFiles.
/**
* Daemon to purge old files
*/
@DaemonScheduled(name = "DMN_PURGE_FILE_STORE_DAEMON_", periodInSeconds = 5 * 60)
public void deleteOldFiles() {
if (purgeDelayMinutesOpt.isPresent()) {
final File documentRootFile = new File(documentRoot);
final long maxTime = System.currentTimeMillis() - purgeDelayMinutesOpt.get() * 60L * 1000L;
doDeleteOldFiles(documentRootFile, maxTime);
}
}
Aggregations