Skip to content

Commit

Permalink
SubscriptionCommand moved to api file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rodolfo committed Jan 15, 2025
1 parent 584cb1a commit 44e4026
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 18 deletions.
8 changes: 7 additions & 1 deletion src/main/kotlin/crablet/query/CrabletQueryApi.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package crablet.query

import crablet.EventName
import crablet.query.impl.SubscriptionCommand
import io.vertx.core.Future
import io.vertx.core.json.JsonObject
import io.vertx.sqlclient.SqlConnection
Expand Down Expand Up @@ -69,3 +68,10 @@ interface SubscriptionsContainer {
command: SubscriptionCommand,
): JsonObject
}

enum class SubscriptionCommand {
TRY_PERFORM_NOW,
PAUSE,
RESUME,
SHOW_STATUS,
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package crablet.query.impl

import crablet.query.IntervalConfig
import crablet.query.SubscriptionCommand
import crablet.query.SubscriptionConfig
import crablet.query.SubscriptionsContainer
import io.vertx.core.DeploymentOptions
Expand Down
8 changes: 0 additions & 8 deletions src/main/kotlin/crablet/query/impl/SubscriptionCommand.kt

This file was deleted.

9 changes: 5 additions & 4 deletions src/main/kotlin/crablet/query/impl/SubscriptionVerticle.kt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package crablet.query.impl

import crablet.query.IntervalConfig
import crablet.query.SubscriptionCommand
import crablet.query.SubscriptionCommand.PAUSE
import crablet.query.SubscriptionCommand.RESUME
import crablet.query.SubscriptionCommand.SHOW_STATUS
import crablet.query.SubscriptionCommand.TRY_PERFORM_NOW
import crablet.query.SubscriptionConfig
import crablet.query.impl.SubscriptionCommand.PAUSE
import crablet.query.impl.SubscriptionCommand.RESUME
import crablet.query.impl.SubscriptionCommand.SHOW_STATUS
import crablet.query.impl.SubscriptionCommand.TRY_PERFORM_NOW
import io.vertx.core.AbstractVerticle
import io.vertx.core.Future
import io.vertx.core.eventbus.Message
Expand Down
1 change: 0 additions & 1 deletion src/test/kotlin/crablet/query/AccountsPgBatchSinkIT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import crablet.command.TransactionContext
import crablet.command.impl.CrabletEventsAppender
import crablet.command.impl.CrabletStateBuilder
import crablet.query.impl.CrabletSubscriptionsContainer
import crablet.query.impl.SubscriptionCommand
import crablet.query.sinks.AccountsPostgresBatchEventSink
import io.kotest.matchers.ints.shouldBeExactly
import io.kotest.matchers.longs.shouldBeExactly
Expand Down
1 change: 0 additions & 1 deletion src/test/kotlin/crablet/query/AccountsPgSingleSinkIT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import crablet.command.TransactionContext
import crablet.command.impl.CrabletEventsAppender
import crablet.command.impl.CrabletStateBuilder
import crablet.query.impl.CrabletSubscriptionsContainer
import crablet.query.impl.SubscriptionCommand
import crablet.query.sinks.AccountsPostgresSingleEventSink
import io.kotest.matchers.ints.shouldBeExactly
import io.kotest.matchers.longs.shouldBeExactly
Expand Down
1 change: 0 additions & 1 deletion src/test/kotlin/crablet/query/AccountsSingleSinkIT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import crablet.command.TransactionContext
import crablet.command.impl.CrabletEventsAppender
import crablet.command.impl.CrabletStateBuilder
import crablet.query.impl.CrabletSubscriptionsContainer
import crablet.query.impl.SubscriptionCommand
import io.kotest.matchers.ints.shouldBeExactly
import io.kotest.matchers.longs.shouldBeExactly
import io.kotest.matchers.shouldBe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import crablet.command.TransactionContext
import crablet.command.impl.CrabletEventsAppender
import crablet.command.impl.CrabletStateBuilder
import crablet.query.impl.CrabletSubscriptionsContainer
import crablet.query.impl.SubscriptionCommand
import crablet.query.sinks.AccountsPostgresSingleEventSink
import io.kotest.matchers.ints.shouldBeExactly
import io.kotest.matchers.longs.shouldBeExactly
Expand Down
1 change: 0 additions & 1 deletion src/test/kotlin/crablet/query/SubscriptionLifecycleIT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import crablet.command.AppendCondition
import crablet.command.impl.CrabletEventsAppender
import crablet.command.impl.CrabletStateBuilder
import crablet.query.impl.CrabletSubscriptionsContainer
import crablet.query.impl.SubscriptionCommand
import io.kotest.matchers.ints.shouldBeExactly
import io.kotest.matchers.longs.shouldBeExactly
import io.kotest.matchers.nulls.shouldNotBeNull
Expand Down

0 comments on commit 44e4026

Please sign in to comment.