Skip to content

Commit

Permalink
fix: remove consume silly log
Browse files Browse the repository at this point in the history
  • Loading branch information
c18s committed May 10, 2022
1 parent 8a388a5 commit 60b1d02
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/services/consumer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,10 @@ export class ConsumerService {
const messageHandler = async (context: EventContext): Promise<void> => {
const control: MessageControl = new MessageControl(context);
const { message_id, body } = context.message;
this.logger.silly(`Incoming '${source}' id: ${message_id}`);
const objectLike = body instanceof Buffer ? body.toString() : body;
const object = parseJSON<T>(objectLike);
try {
const startTime = new Date();
await callback(object, control);
const durationInMs = new Date().getTime() - startTime.getTime();
this.logger.silly(`Completed '${source}' id: ${message_id} in ${durationInMs / 1000} seconds`);
if (!control.isHandled) {
control.accept();
}
Expand Down

0 comments on commit 60b1d02

Please sign in to comment.