aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--param.ccl6
-rw-r--r--src/rdf.cc4
2 files changed, 9 insertions, 1 deletions
diff --git a/param.ccl b/param.ccl
index e505332..8746ea2 100644
--- a/param.ccl
+++ b/param.ccl
@@ -24,6 +24,12 @@ INT timeout "Timeout for sending meta information to a server (in seconds)" STEE
1:* :: "a positive value"
} 10
+INT metadata_lifetime "Lifetime of meta information sent to a server (in hours)" STEERABLE=always
+{
+ 0 :: "zero to store the metadata forever"
+ 1:* :: "a positive value to limit the lifetime to so many hours"
+} 100
+
# Parameters for collecting metadata
diff --git a/src/rdf.cc b/src/rdf.cc
index 012358a..49d2ab3 100644
--- a/src/rdf.cc
+++ b/src/rdf.cc
@@ -471,7 +471,9 @@ namespace Formaline
databuf
<< (get_state() == initial ? "PUT" : "POST")
<< " /context/CactusSimulations/" << jobID;
-// if (get_state() != initial) databuf << "?action=update";
+ // set a metadata lifetime if requested by the user
+ // (Formaline::time_to_live is hours but the RDF service wants seconds)
+ if (metadata_lifetime) databuf << "?ttl=" << (metadata_lifetime * 3600);
databuf << " HTTP/1.0\r\n"
<< "Host: " << rdf_hostname[i] << "\r\n"
<< "Content-Type: application/rdf+xml\r\n"