8000 the 'use_notify' option is on the factory, not on the postgres connec… · symfony/symfony@2b82b4a · GitHub
[go: up one dir, main page]

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

Commit 2b82b4a

Browse files
committed
the 'use_notify' option is on the factory, not on the postgres connection class
1 parent 8306a88 commit 2b82b4a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/DoctrineTransportFactory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public function __construct($registry)
3535
$this->registry = $registry;
3636
}
3737

38+
/**
39+
* @param array $options You can set 'use_notify' to false to not use LISTEN/NOTIFY with postgresql
40+
*/
3841
public function createTransport(string $dsn, array $options, SerializerInterface $serializer): TransportInterface
3942
{
4043
$useNotify = ($options['use_notify'] ?? true);

src/Symfony/Component/Messenger/Bridge/Doctrine/Transport/PostgreSqlConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@
1616
/**
1717
* Uses PostgreSQL LISTEN/NOTIFY to push messages to workers.
1818
*
19+
* If you do not want to use the LISTEN mechanism, set the `use_notify` option to `false` when calling DoctrineTransportFactory::createTransport.
20+
*
1921
* @internal
2022
*
2123
* @author Kévin Dunglas <dunglas@gmail.com>
2224
*/
2325
final class PostgreSqlConnection extends Connection
2426
{
2527
/**
26-
* * use_notify: Set to false to disable the use of LISTEN/NOTIFY. Default: true
2728
* * check_delayed_interval: The interval to check for delayed messages, in milliseconds. Set to 0 to disable checks. Default: 60000 (1 minute)
2829
* * get_notify_timeout: The length of time to wait for a response when calling PDO::pgsqlGetNotify, in milliseconds. Default: 0.
2930
*/
3031
protected const DEFAULT_OPTIONS = parent::DEFAULT_OPTIONS + [
31-
'use_notify' => true,
3232
'check_delayed_interval' => 60000,
3333
'get_notify_timeout' => 0,
3434
];

0 commit comments

Comments
 (0)
0