Skip to content

Commit

Permalink
Make AwsSqsJobHandlerSubscriptionService public...
Browse files Browse the repository at this point in the history
... to allow usage in the service dependency graph

Users may wish to let other Services depend on the AWS JobHandler
Subscription service in cases where you want to ensure that SQS job
handling has begun before your service has started.
  • Loading branch information
hamdanjaveed committed Apr 15, 2024
1 parent 81ea336 commit 6b0bdca
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class AwsSqsJobHandlerModule<T : JobHandler> private constructor(
}

@Singleton
internal class AwsSqsJobHandlerSubscriptionService @Inject constructor(
class AwsSqsJobHandlerSubscriptionService @Inject internal constructor(
private val attributeImporter: AwsSqsQueueAttributeImporter,
private val consumer: SqsJobConsumer,
private val consumerMapping: Map<QueueName, JobHandler>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.time.Duration
import java.util.concurrent.atomic.AtomicBoolean
import jakarta.inject.Inject

internal class AwsSqsQueueAttributeImporter @Inject constructor(
class AwsSqsQueueAttributeImporter @Inject internal constructor(
private val config: AwsSqsJobQueueConfig,
private val leaseManager: LeaseManager,
private val metrics: SqsMetrics,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import jakarta.inject.Inject
import jakarta.inject.Singleton

@Singleton
internal class QueueResolver @Inject internal constructor(
class QueueResolver @Inject internal constructor(
private val currentRegion: AwsRegion,
private val currentAccount: AwsAccountId,
private val defaultSQS: AmazonSQS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import misk.cloud.aws.AwsRegion
import misk.jobqueue.QueueName

/** [ResolvedQueue] provides information needed to reach an SQS queue */
internal class ResolvedQueue(
class ResolvedQueue internal constructor(
val name: QueueName,
val sqsQueueName: QueueName,
val url: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import com.google.inject.Provider
import jakarta.inject.Singleton

@Singleton
internal class SqsJobConsumer @Inject internal constructor(
class SqsJobConsumer @Inject internal constructor(
@ForSqsHandling private val handlingThreads: ExecutorService,
@ForSqsHandling private val taskQueue: RepeatedTaskQueue,
@ForSqsReceiving private val receivingThreads: ExecutorService,
Expand Down
2 changes: 1 addition & 1 deletion misk-aws/src/main/kotlin/misk/jobqueue/sqs/SqsMetrics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import jakarta.inject.Singleton
* for queues both client-side and on SQS with the same label.
*/
@Singleton
internal class SqsMetrics @Inject internal constructor(metrics: Metrics) {
class SqsMetrics @Inject internal constructor(metrics: Metrics) {
val jobsEnqueued = metrics.counter(
"jobs_enqueued_total",
"total # of jobs sent to a queueName",
Expand Down

0 comments on commit 6b0bdca

Please sign in to comment.