PHRAS-3413 add timeout when emit webhook

This commit is contained in:
aynsix
2021-11-08 16:51:11 +03:00
parent 5b93a4b735
commit a186068b07
3 changed files with 5 additions and 1 deletions

View File

@@ -89,6 +89,7 @@ class WebhookWorker implements WorkerInterface
$proxyConfig = new NetworkProxiesConfiguration($this->app['conf']);
$clientOptions = [
'timeout' => $this->app['conf']->get(['workers', 'webhook', 'timeout'], 30), // default time out 30 sec if not set
'connect_timeout' => 50, // should be less than default rabbit timeout 60 to avoid to block Q
'headers' => [
'User-Agent' => sprintf('Phraseanet/%s (%s)', $version->getNumber(), $version->getName())