public class DiskCleanupTask
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
DiskCleanupTask(@NotNull DiskCleanupProperties properties,
@NotNull org.springframework.scheduling.TaskScheduler scheduler,
@NotNull org.springframework.core.io.Resource jobsDir,
@NotNull JobSearchService jobSearchService,
@NotNull JobsProperties jobsProperties,
@NotNull org.apache.commons.exec.Executor processExecutor,
@NotNull io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
run()
Checks the disk for jobs on this host.
|
public DiskCleanupTask(@NotNull @NotNull DiskCleanupProperties properties, @NotNull @NotNull org.springframework.scheduling.TaskScheduler scheduler, @NotNull @NotNull org.springframework.core.io.Resource jobsDir, @NotNull @NotNull JobSearchService jobSearchService, @NotNull @NotNull JobsProperties jobsProperties, @NotNull @NotNull org.apache.commons.exec.Executor processExecutor, @NotNull @NotNull io.micrometer.core.instrument.MeterRegistry registry) throws java.io.IOException
properties
- The disk cleanup properties to use.scheduler
- The scheduler to use to schedule the cron trigger.jobsDir
- The resource representing the location of the job directoryjobSearchService
- The service to find jobs withjobsProperties
- The jobs properties to useprocessExecutor
- The process executor to use to delete directoriesregistry
- The metrics registryjava.io.IOException
- When it is unable to open a file reference to the job directory