Skip to content

Commit

Permalink
PISHPS-387: "Starting Subscription Renewal Reminder from Scheduled Ta…
Browse files Browse the repository at this point in the history
…sks" log info message now only appears when subscriptions are enabled (#893)
  • Loading branch information
m-muxfeld-diw authored Nov 14, 2024
1 parent b011aa0 commit b4961c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/Components/Subscription/Actions/RemindAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class RemindAction extends BaseAction
*/
private $reminderValidator;

/**
* @var LoggerInterface
*/
protected $log;


/**
* @param SettingsService $pluginSettings
Expand Down Expand Up @@ -96,6 +101,11 @@ public function remindSubscriptionRenewal(Context $context): int
continue;
}

$message = 'Starting Subscription Renewal Reminder from Scheduled Tasks for SalesChannel "%s".';
$message = sprintf($message, $salesChannel->getName());

$this->log->info($message);

$daysOffset = $settings->getSubscriptionsReminderDays();

$availableSubscriptions = $this->getRepository()->findByReminderRangeReached($salesChannel->getId(), $context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public static function getHandledMessages(): iterable
public function run(): void
{
try {
$this->logger->info('Starting Subscription Renewal Reminder from Scheduled Tasks.');

$context = new Context(new SystemSource());

$remindedCount = $this->subscriptionManager->remindSubscriptionRenewal($context);
Expand Down

0 comments on commit b4961c2

Please sign in to comment.