Skip to content

Commit

Permalink
[EPC-9177] Update log type and use notification logs for success mess…
Browse files Browse the repository at this point in the history
…ages
  • Loading branch information
Can Demiralp committed Feb 4, 2025
1 parent 35c2976 commit 57a310a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Cron/RemoveProcessedWebhooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2024 Adyen N.V. (https://www.adyen.com/)
* Copyright (c) 2025 Adyen N.V. (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
Expand All @@ -22,6 +22,9 @@ class RemoveProcessedWebhooks
{
/**
* @param WebhooksProviderInterface[] $providers
* @param AdyenLogger $adyenLogger
* @param Config $configHelper
* @param AdyenNotificationRepositoryInterface $adyenNotificationRepository
*/
public function __construct(
private readonly array $providers,
Expand Down Expand Up @@ -70,13 +73,13 @@ public function execute(): void
}
}

$successMessage = sprintf(
__('%s webhook notifications have been cleaned-up by the CleanupNotifications job.'),
$successMessage = __(
'%1 processed webhooks have been removed by the RemoveProcessedWebhooks cronjob.',
$numberOfItemsRemoved
);
$this->adyenLogger->addAdyenDebug($successMessage);
$this->adyenLogger->addAdyenNotification($successMessage);
} else {
$message = __('Webhook notification clean-up feature is disabled. The job has been skipped!');
$message = __('Processed webhook removal feature is disabled. The cronjob has been skipped!');
$this->adyenLogger->addAdyenDebug($message);
}
}
Expand Down

0 comments on commit 57a310a

Please sign in to comment.