Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORE-17386 - Add flow session timeout scheduled task #4740

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import net.corda.lifecycle.StopEvent
import net.corda.lifecycle.createCoordinator
import net.corda.orm.JpaEntitiesRegistry
import net.corda.processors.scheduler.SchedulerProcessor
import net.corda.schema.Schemas.ScheduledTask.SCHEDULED_TASK_DB_PROCESSOR
import net.corda.schema.Schemas.ScheduledTask
import net.corda.schema.configuration.BootConfig
import org.osgi.service.component.annotations.Activate
import org.osgi.service.component.annotations.Component
Expand Down Expand Up @@ -51,8 +51,6 @@ class SchedulerProcessorImpl @Activate constructor(

companion object {
private val logger = LoggerFactory.getLogger(this::class.java.enclosingClass)

private const val DEDUPLICATION_TABLE_CLEAN_UP_TASK = "deduplication-table-clean-up-task"
}

private val dependentComponents = DependentComponents.of(
Expand All @@ -66,7 +64,11 @@ class SchedulerProcessorImpl @Activate constructor(

// now just hardcoding schedulers here until CORE-16331 is picked up, when we should take this from config
private val schedules = listOf<Schedule>(
Schedule(DEDUPLICATION_TABLE_CLEAN_UP_TASK, 120, SCHEDULED_TASK_DB_PROCESSOR)
Schedule(ScheduledTask.SCHEDULED_TASK_NAME_DB_PROCESSOR,
120, ScheduledTask.SCHEDULED_TASK_TOPIC_DB_PROCESSOR),
Schedule(
ScheduledTask.SCHEDULED_TASK_NAME_SESSION_TIMEOUT,
60, ScheduledTask.SCHEDULED_TASK_TOPIC_FLOW_PROCESSOR),
)
private var schedulers: Schedulers? = null

Expand Down