path: root/src/config.c
diff options
authorSergey Poznyakoff <gray@gnu.org>2018-03-14 17:22:18 +0200
committerSergey Poznyakoff <gray@gnu.org>2018-03-14 23:21:26 +0200
commit649a04b9deec5d111e735bc47c37adca7e76f39e (patch)
treec651192f145575fc7a49d591738f9cfc6e80e6d8 /src/config.c
parentae194ce922bff039e9003f1e84d44132aab63c3e (diff)
Implement exponential backoff with jitter to handle RequestLimitExceeded
* src/eclat.h (eclat_command_env) <curl>: Remove. <xmltree>: New field. * src/util.c (translate_ids): Close the map when no longer needed (eclat_send_request): Implement exponential backoff. * src/ec2map.c: Reflect the above changes. * src/eclat.c: Likewise. * lib/libeclat.h (eclat_request_dup): New proto. * lib/reqcreat.c (eclat_request_dup): New function. * src/config.c: New configuration statements: max-retry-interval and retry-timeout.
Diffstat (limited to 'src/config.c')
1 files changed, 7 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 49b47f9..6fac842 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1,5 +1,5 @@
/* This file is part of Eclat.
- Copyright (C) 2012-2015 Sergey Poznyakoff.
+ Copyright (C) 2012-2018 Sergey Poznyakoff.
Eclat is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -396,6 +396,12 @@ static struct grecs_keyword eclat_kw[] = {
"Specifies a file containing `accessID:accessKey' pairs.",
grecs_type_string, GRECS_DFLT, &access_file_name, 0,
cb_access_file },
+ { "max-retry-interval", "seconds",
+ "Maximum interval between retries in exponential backoff algorithm.",
+ grecs_type_ulong, GRECS_DFLT, &max_retry_sleep },
+ { "retry-timeout", "seconds",
+ "Give up retrying after this many seconds",
+ grecs_type_ulong, GRECS_DFLT, &max_retry_time },
{ "default-region", "name",
"Define default AWS region",
grecs_type_string, GRECS_DFLT, &region_name },

Return to:

Send suggestions and report system problems to the System administrator.