Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 6, 2022. It is now read-only.

Flush spool queue for console terminate as well #64

Merged
merged 2 commits into from
Nov 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions 9 EventListener/EmailSenderListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\IntrospectableContainerInterface;
use Symfony\Component\HttpKernel\Event\PostResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Console\ConsoleEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
Expand All @@ -33,7 +33,7 @@ public function __construct(ContainerInterface $container)
$this->container = $container;
}

public function onKernelTerminate(PostResponseEvent $event)
public function onTerminate()
{
if (!$this->container->has('mailer')) {
return;
Expand All @@ -57,6 +57,9 @@ public function onKernelTerminate(PostResponseEvent $event)

static public function getSubscribedEvents()
{
return array(KernelEvents::TERMINATE => 'onKernelTerminate');
return array(
KernelEvents::TERMINATE => 'onTerminate',
ConsoleEvents::TERMINATE => 'onTerminate'
);
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.