From 0e06055b12707422787bd5a2c7c9aeac4196b4a8 Mon Sep 17 00:00:00 2001 From: Rebecca Le Date: Wed, 4 Nov 2020 09:40:35 +0800 Subject: [PATCH] Extend hackney timeout from the default of 5 seconds to 60 seconds This also matches the duration of the `Task.await` calls throughout the library --- lib/cloudex/cloudinary_api.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cloudex/cloudinary_api.ex b/lib/cloudex/cloudinary_api.ex index eb55962..32b5cc2 100644 --- a/lib/cloudex/cloudinary_api.ex +++ b/lib/cloudex/cloudinary_api.ex @@ -116,7 +116,9 @@ defmodule Cloudex.CloudinaryApi do defp credentials do [ hackney: [ - basic_auth: {Cloudex.Settings.get(:api_key), Cloudex.Settings.get(:secret)} + basic_auth: {Cloudex.Settings.get(:api_key), Cloudex.Settings.get(:secret)}, + timeout: 60_000, + recv_timeout: 60_000 ] ] end