@Configuration @EnableConfigurationProperties(value=DiskCleanupProperties.class) public class NodeAutoConfiguration extends java.lang.Object
| Constructor and Description |
|---|
NodeAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
DiskCleanupTask |
diskCleanupTask(DiskCleanupProperties properties,
org.springframework.scheduling.TaskScheduler scheduler,
org.springframework.core.io.Resource jobsDir,
DataServices dataServices,
JobsProperties jobsProperties,
org.apache.commons.exec.Executor processExecutor,
io.micrometer.core.instrument.MeterRegistry registry)
If required get a
DiskCleanupTask instance for use. |
@Bean
@ConditionalOnProperty(value="genie.tasks.disk-cleanup.enabled",
havingValue="true")
@ConditionalOnMissingBean(value=DiskCleanupTask.class)
public DiskCleanupTask diskCleanupTask(DiskCleanupProperties properties,
@Qualifier(value="genieTaskScheduler")
org.springframework.scheduling.TaskScheduler scheduler,
@Qualifier(value="jobsDir")
org.springframework.core.io.Resource jobsDir,
DataServices dataServices,
JobsProperties jobsProperties,
org.apache.commons.exec.Executor processExecutor,
io.micrometer.core.instrument.MeterRegistry registry)
throws java.io.IOException
DiskCleanupTask instance for use.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 directorydataServices - The DataServices instance to usejobsProperties - The jobs properties to useprocessExecutor - The process executor to use to delete directoriesregistry - The metrics registryDiskCleanupTask instancejava.io.IOException - When it is unable to open a file reference to the job directory