Skip to content

Commit

Permalink
refactor: added logs
Browse files Browse the repository at this point in the history
Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
  • Loading branch information
sairanjit committed Jul 15, 2024
1 parent 5980086 commit 021e0ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/storage/StorageMessageQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export class StorageServiceMessageQueue implements MessagePickupRepository {

const messageRecords = await this.messageRepository.findByConnectionId(this.agentContext, connectionId)

this.agentContext.config.logger.debug(`Found ${messageRecords.length} messages for connection ${connectionId}`)

return messageRecords.length
}

Expand Down Expand Up @@ -101,6 +103,8 @@ export class StorageServiceMessageQueue implements MessagePickupRepository {
public async removeMessages(options: RemoveMessagesOptions) {
const { messageIds } = options

this.agentContext.config.logger.debug(`Removing message ids ${messageIds}`)

const deletePromises = messageIds.map((messageId) =>
this.messageRepository.deleteById(this.agentContext, messageId)
)
Expand Down

0 comments on commit 021e0ac

Please sign in to comment.