Skip to content

Commit

Permalink
Merge pull request #51 from embrace-io/alter-periodic-caching
Browse files Browse the repository at this point in the history
Alter how periodic session caching works
  • Loading branch information
fractalwrench authored Nov 13, 2023
2 parents ea815e8 + 9f72815 commit 3d9b6e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ internal class SessionHandler(
}

try {
this.automaticSessionStopper.scheduleAtFixedRate(
this.automaticSessionStopper.scheduleWithFixedDelay(
automaticSessionStopperCallback,
maxSessionSeconds.toLong(),
maxSessionSeconds.toLong(),
Expand Down Expand Up @@ -592,7 +592,7 @@ internal class SessionHandler(
*/
private fun startPeriodicCaching(cacheCallback: Runnable) {
try {
scheduledFuture = this.sessionPeriodicCacheExecutorService.scheduleAtFixedRate(
scheduledFuture = this.sessionPeriodicCacheExecutorService.scheduleWithFixedDelay(
cacheCallback,
0,
SESSION_CACHING_INTERVAL.toLong(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ internal class SessionHandlerTest {
assertEquals(1, gatingService.sessionMessagesFiltered.size)
// verify automatic session stopper has been scheduled
verify {
mockAutomaticSessionStopper.scheduleAtFixedRate(
mockAutomaticSessionStopper.scheduleWithFixedDelay(
mockAutomaticSessionStopperRunnable,
maxSessionSeconds.toLong(),
maxSessionSeconds.toLong(),
Expand All @@ -220,7 +220,7 @@ internal class SessionHandlerTest {
}
// verify periodic caching worker has been scheduled
verify {
mockSessionPeriodicCacheExecutorService.scheduleAtFixedRate(
mockSessionPeriodicCacheExecutorService.scheduleWithFixedDelay(
mockPeriodicCachingRunnable,
0,
SESSION_CACHING_INTERVAL.toLong(),
Expand Down

0 comments on commit 3d9b6e1

Please sign in to comment.