diff --git a/config/configuration.sample.yml b/config/configuration.sample.yml index 3c1d98be83..72b4a97e77 100644 --- a/config/configuration.sample.yml +++ b/config/configuration.sample.yml @@ -343,6 +343,8 @@ workers: pullAssets: ttl_retry: 5000 max_retry : 5 + webhook: + timeout: 30 externalservice: ginger: diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php index 04f163305e..8b709dda6f 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/WebhookWorker.php @@ -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()) diff --git a/lib/conf.d/configuration.yml b/lib/conf.d/configuration.yml index 7cf86d71d0..88e551063d 100644 --- a/lib/conf.d/configuration.yml +++ b/lib/conf.d/configuration.yml @@ -335,7 +335,8 @@ workers: password: '' vhost: / heartbeat: 60 - + webhook: + timeout: 30 externalservice: ginger: AutoSubtitling: