Commit 9f147007 authored by Maria Arsuaga Rios's avatar Maria Arsuaga Rios
Browse files

FTS-995:Timeout is ignored in CLI

parent c958d304
Pipeline #146197 passed with stage
in 44 seconds
......@@ -33,6 +33,7 @@ const std::string JobParameterHandler::LAN_CONNECTION = "lan_connection";
const std::string JobParameterHandler::FAIL_NEARLINE = "fail_nearline";
const std::string JobParameterHandler::OVERWRITEFLAG = "overwrite";
const std::string JobParameterHandler::CHECKSUM_METHOD = "checksum_method";
const std::string JobParameterHandler::CHECKSUM_MODE = "checksum_mode";
const std::string JobParameterHandler::REUSE = "reuse";
const std::string JobParameterHandler::JOB_METADATA = "job_metadata";
const std::string JobParameterHandler::RETRY = "retry";
......
......@@ -79,6 +79,7 @@ public:
static const std::string FAIL_NEARLINE;
static const std::string OVERWRITEFLAG;
static const std::string CHECKSUM_METHOD;
static const std::string CHECKSUM_MODE;
static const std::string REUSE;
static const std::string JOB_METADATA;
static const std::string RETRY;
......
......@@ -87,8 +87,8 @@ void RestSubmission::strip_values(std::string & json, std::string const & token)
std::string RestSubmission::strip_values(std::string const & json)
{
static std::string tokens[] =
{"filesize", "verify_checksum", "reuse", "bring_online", "copy_pin_lifetime", "overwrite", "multihop", "retry"};
static int const size = 8;
{"filesize", "verify_checksum", "reuse", "bring_online", "copy_pin_lifetime", "overwrite", "multihop", "retry", "timeout"};
static int const size = 9;
std::string ret = json;
for (int index = 0; index < size; ++index)
......@@ -150,6 +150,7 @@ std::ostream& operator<<(std::ostream& os, RestSubmission const & me)
{
params.put("verify_checksum", true);
}
if (me.parameters.find(JobParameterHandler::REUSE) != me.parameters.end())
{
params.put("reuse", true);
......@@ -159,6 +160,11 @@ std::ostream& operator<<(std::ostream& os, RestSubmission const & me)
{
params.put("spacetoken", param_itr->second);
}
param_itr = me.parameters.find(JobParameterHandler::CHECKSUM_MODE);
if (param_itr != me.parameters.end())
{
params.put("verify_checksum", param_itr->second);
}
param_itr = me.parameters.find(JobParameterHandler::BRING_ONLINE);
if (param_itr != me.parameters.end() && param_itr->second != "-1")
{
......@@ -169,6 +175,11 @@ std::ostream& operator<<(std::ostream& os, RestSubmission const & me)
{
params.put("copy_pin_lifetime", param_itr->second);
}
param_itr = me.parameters.find(JobParameterHandler::TIMEOUT);
if (param_itr != me.parameters.end() && param_itr->second != "-1")
{
params.put("timeout", param_itr->second);
}
param_itr = me.parameters.find(JobParameterHandler::JOB_METADATA);
if (param_itr != me.parameters.end())
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment