diff options
-rw-r--r-- | param.ccl | 6 | ||||
-rw-r--r-- | src/rdf.cc | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -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 @@ -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" |