From 3c36ab2de0365d2f9664fd3f4c8e84456dc53bc1 Mon Sep 17 00:00:00 2001 From: dev1lfreak Date: Mon, 15 Jun 2026 13:58:47 +0300 Subject: [PATCH] refactor: remove comments --- .../commands/purchase_request_commands.py | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/application/commands/purchase_request_commands.py b/src/application/commands/purchase_request_commands.py index a74d989..72022db 100644 --- a/src/application/commands/purchase_request_commands.py +++ b/src/application/commands/purchase_request_commands.py @@ -60,21 +60,21 @@ class CreatePurchaseRequestCommand: 'metadata': metadata, } self._logger.info(f'Create purchase request for organization_id={legal_entity.id } with rub_amount={rub_amount}') - # try: - # await self._messanger.publish_to_queue( - # queue=settings.RABBIT_TELEGRAM_NOTIFY_QUEUE, - # message=message, - # persist=True, - # correlation_id=trace_id, - # message_id=message_id, - # headers={'trace_id': trace_id} if trace_id else None, - # ) - # except Exception as exception: - # self._logger.error(f'Failed to publish purchase request notification for organization_id={legal_entity.id}: {str(exception)}') - # raise ApplicationException(503, 'Temporary error. Please try again.') + try: + await self._messanger.publish_to_queue( + queue=settings.RABBIT_TELEGRAM_NOTIFY_QUEUE, + message=message, + persist=True, + correlation_id=trace_id, + message_id=message_id, + headers={'trace_id': trace_id} if trace_id else None, + ) + except Exception as exception: + self._logger.error(f'Failed to publish purchase request notification for organization_id={legal_entity.id}: {str(exception)}') + raise ApplicationException(503, 'Temporary error. Please try again.') - # self._logger.info(f'Purchase request created id= organization_id={legal_entity.id }') - # return item + self._logger.info(f'Purchase request created id= organization_id={legal_entity.id }') + return item class ListPurchaseRequestsCommand: