Skip to content

Commit

Permalink
style: adjust naming slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Drodevbar committed Jan 10, 2025
1 parent 7858855 commit 3e77c00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/core/lib/queues/AbstractQueueService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ export abstract class AbstractQueueService<
}
}

/** Retrieves cache key from deduplication store and checks if it exists */
/** Retrieves deduplication key from deduplication store and checks if it exists */
protected async isMessageDuplicated(message: MessagePayloadSchemas): Promise<boolean> {
if (!this.messageDeduplicationConfig) {
return false
Expand All @@ -535,7 +535,7 @@ export abstract class AbstractQueueService<
return retrievedCacheKey !== null
}

/** Stores cache key in deduplication store */
/** Stores deduplication key in deduplication store */
protected async deduplicateMessage(message: MessagePayloadSchemas): Promise<void> {
if (!this.messageDeduplicationConfig) {
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('RedisMessageDeduplicationStore', () => {
})

describe('storeCacheKey', () => {
it('stores a cache key in Redis with provided value and ttl', async () => {
it('stores a key in Redis with provided value and ttl', async () => {
const key = 'test_key'
const value = 'test_value'
const ttlSeconds = 60
Expand All @@ -50,7 +50,7 @@ describe('RedisMessageDeduplicationStore', () => {
})

describe('retrieveCacheKey', () => {
it('retrieves a cache key from Redis', async () => {
it('retrieves a key from Redis', async () => {
const key = 'test_key'
const value = 'test_value'
const ttlSeconds = 60
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('SqsPermissionPublisher', () => {
await diContainer.dispose()
})

it('writes cache key to redis using provided deduplication function and publishes message', async () => {
it('writes deduplication key to store using provided deduplication function and publishes message', async () => {
const message = {
id: '1',
messageType: 'add',
Expand All @@ -75,7 +75,7 @@ describe('SqsPermissionPublisher', () => {
expect(cacheKey).not.toBeNull()
})

it('does not publish the same message if cache key already exists', async () => {
it('does not publish the same message if deduplication key already exists', async () => {
const message = {
id: '1',
messageType: 'add',
Expand All @@ -101,7 +101,7 @@ describe('SqsPermissionPublisher', () => {
expect(spySecondCall).toBeUndefined()
})

it('publishing messages that produce different cache keys does not affect each other', async () => {
it('publishing messages that produce different deduplication keys does not affect each other', async () => {
const message1 = {
id: '1',
messageType: 'add',
Expand Down

0 comments on commit 3e77c00

Please sign in to comment.