Skip to content

Commit

Permalink
Airbyte Cron: renable schedule to file cleaner (#20317)
Browse files Browse the repository at this point in the history
* readd schedule to cleaner

* import scheduled
  • Loading branch information
marcosmarxm committed Dec 11, 2022
1 parent 1fce890 commit e29d5ff
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import io.airbyte.metrics.lib.ApmTraceUtils;
import io.micronaut.context.annotation.Requires;
import io.micronaut.context.env.Environment;
import io.micronaut.scheduling.annotation.Scheduled;
import jakarta.inject.Singleton;
import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -52,6 +53,7 @@ public class WorkspaceCleaner {
* NOTE: this is currently only intended to work for docker
*/
@Trace(operationName = SCHEDULED_TRACE_OPERATION_NAME)
@Scheduled(fixedRate = "1d")
public void deleteOldFiles() throws IOException {
final Date oldestAllowed = getDateFromDaysAgo(maxAgeFilesInDays);
log.info("Deleting files older than {} days ({})", maxAgeFilesInDays, oldestAllowed);
Expand Down

0 comments on commit e29d5ff

Please sign in to comment.