aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/worker/worker.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index 81204bd..b96dfeb 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -49,8 +49,13 @@ namespace bbot
dir_path env_dir;
- const size_t tftp_timeout (10); // 10 seconds.
- const size_t tftp_retries (3); // Task request retries (see startup()).
+ // Note that upload can be quite large and take a while to upload under high
+ // load.
+ //
+ const size_t tftp_blksize (1024); // Between 512 (default) and 65464.
+ const size_t tftp_put_timeout (100); // 100 seconds.
+ const size_t tftp_get_timeout (10); // 10 seconds.
+ const size_t tftp_get_retries (3); // Task request retries (see startup()).
}
static dir_path
@@ -1382,7 +1387,8 @@ build (size_t argc, const char* argv[])
nullfd,
curl::put,
url,
- "--max-time", tftp_timeout);
+ "--tftp-blksize", tftp_blksize,
+ "--max-time", tftp_put_timeout);
serialize_manifest (rm, c.out, url, "result");
c.out.close ();
@@ -1453,7 +1459,8 @@ startup ()
mf,
curl::get,
url,
- "--max-time", tftp_timeout);
+ "--tftp-blksize", tftp_blksize,
+ "--max-time", tftp_get_timeout);
if (!c.wait ())
throw_generic_error (EIO);
@@ -1462,7 +1469,7 @@ startup ()
}
catch (const system_error& e)
{
- bool bail (retry > tftp_retries);
+ bool bail (retry > tftp_get_retries);
diag_record dr (bail ? error : warn);
dr << "unable to download task manifest from " << url << " on "
@@ -1561,7 +1568,8 @@ startup ()
nullfd,
curl::put,
url,
- "--max-time", tftp_timeout);
+ "--tftp-blksize", tftp_blksize,
+ "--max-time", tftp_put_timeout);
serialize_manifest (rm, c.out, url, "result");
c.out.close ();