0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Added 60s timeout to Mailgun API calls

refs https://github.com/TryGhost/Toolbox/issues/164

- see referenced issue for more context but Ghost sometimes has issues
  with the email analytics job getting stuck
- we don't provide a timeout to the Mailgun library, so we just
  sit there idling for eternity if something between us and Mailgun is
  causing issues
- this commit adds a 60s timeout so we can at least error out and try
  again next time
This commit is contained in:
Daniel Lockyer 2022-08-24 09:13:13 +02:00
parent 76406f78bb
commit 36c0b7d2bd
No known key found for this signature in database
GPG key ID: D21186F0B47295AD

View file

@ -194,7 +194,8 @@ module.exports = class MailgunClient {
return mailgun.client({
username: 'api',
key: mailgunConfig.apiKey,
url: baseUrl.origin
url: baseUrl.origin,
timeout: 60000
});
}