aboutsummaryrefslogtreecommitdiff
path: root/bbot/worker/worker.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bbot/worker/worker.cxx')
-rw-r--r--bbot/worker/worker.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index 1f5c946..f9081a2 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -547,9 +547,9 @@ run_b (step_id step,
verbosity, buildspec, forward<A> (a)...);
}
-// Upload manifest to the specified TFTP URL with curl. Issue diagnostics and
-// throw failed on invalid manifest or process management errors and throw
-// io_error for input/output errors or non-zero curl exit.
+// Upload compressed manifest to the specified TFTP URL with curl. Issue
+// diagnostics and throw failed on invalid manifest or process management
+// errors and throw io_error for input/output errors or non-zero curl exit.
//
template <typename T>
static void
@@ -564,9 +564,11 @@ upload_manifest (tracer& trace,
// broken pipe error on the client and partial/truncated upload on the
// server. This happens quite regularly on older Linux distributions
// (e.g., Debian 8, Ubuntu 16.04) but also sometimes on Windows. On the
- // other hand, uploading from a file appears to work reliably.
+ // other hand, uploading from a file appears to work reliably (we still
+ // get an odd error on Windows from time to time with larger uploads).
//
#if 0
+ // Note: need to add compression support if re-enable this.
tftp_curl c (trace,
path ("-"),
nullfd,
@@ -582,10 +584,12 @@ upload_manifest (tracer& trace,
auto_rmfile tmp;
try
{
- tmp = auto_rmfile (path::temp_path (what + "-manifest"));
+ tmp = auto_rmfile (path::temp_path (what + "-manifest.lz4"));
ofdstream ofs (tmp.path);
- manifest_serializer s (ofs, tmp.path.string ());
+ olz4stream ozs (ofs, 5 /* 256KB */, 9, nullopt /* content_size */);
+ manifest_serializer s (ozs, tmp.path.string ());
m.serialize (s);
+ ozs.close ();
ofs.close ();
}
catch (const io_error& e) // In case not derived from system_error.