Skip to content

Commit

Permalink
Add flow session timout scheduled task
Browse files Browse the repository at this point in the history
  • Loading branch information
driessamyn committed Sep 29, 2023
1 parent faaad10 commit 1833133
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ commonsTextVersion = 1.10.0
bouncycastleVersion=1.73
# Corda API libs revision (change in 4th digit indicates a breaking change)
# Change to 5.0.0.xx-SNAPSHOT to pick up maven local published copy
cordaApiVersion=5.1.0.25-beta+
#cordaApiVersion=5.1.0.25-beta+
cordaApiVersion=5.1.0.25-alpha-1695977914369

disruptorVersion=3.4.4
felixConfigAdminVersion=1.9.26
Expand Down
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

0 comments on commit 1833133

Please sign in to comment.