8000 [Messenger] Change the default notify timeout value for PostgreSQL by fabpot · Pull Request #36990 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Messenger] Change the default notify timeout value for PostgreSQL #36990

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 29, 2020
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
[Messenger] Change the default notify timeout value for PostgreSQL
  • Loading branch information
fabpot committed May 29, 2020
commit d9decf9da29dd8214d0fd81f067eba14d767f0c2
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ final class PostgreSqlConnection extends Connection
{
/**
* * use_notify: Set to false to disable the use of LISTEN/NOTIFY. Default: true
* * check_delayed_interval: The interval to check for delayed messages, in milliseconds. Set to 0 to disable checks. Default: 1000
* * check_delayed_interval: The interval to check for delayed messages, in milliseconds. Set to 0 to disable checks. Default: 60000 (1 minute)
* * get_notify_timeout: The length of time to wait for a response when calling PDO::pgsqlGetNotify, in milliseconds. Default: 0.
*/
protected const DEFAULT_OPTIONS = parent::DEFAULT_OPTIONS + [
'check_delayed_interval' => 1000,
'check_delayed_interval' => 60000,
'get_notify_timeout' => 0,
];

Expand Down Expand Up @@ -75,6 +75,8 @@ public function get(): ?array
// delayed messages
(microtime(true) * 1000 - $this->queueEmptiedAt < $this->configuration['check_delayed_interval'])
) {
usleep(1000);

return null;
}

Expand Down
0