Adding in check for cores and memoryMB
This commit is contained in:
@@ -130,7 +130,15 @@ bool SSHTaskExecutor::validateTaskParameters(const ConfigValues &job)
|
|||||||
{
|
{
|
||||||
return fe_.validateTaskParameters(job);
|
return fe_.validateTaskParameters(job);
|
||||||
|
|
||||||
// TODO add in requirement for memory, cores, users, privkey, port
|
// TODO add in requirement for users, privkey, port
|
||||||
|
if (job.count("cores") == 0 or
|
||||||
|
!std::holds_alternative<std::string>(job.at("cores")))
|
||||||
|
throw std::runtime_error(
|
||||||
|
R"(Job must define the number of cores it requires)");
|
||||||
|
|
||||||
|
if (job.count("memoryMB") == 0 or
|
||||||
|
!std::holds_alternative<std::string>(job.at("memoryMB")))
|
||||||
|
throw std::runtime_error(R"(Job must define the memoryMB it requires)");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user