Adding in check for cores and memoryMB

This commit is contained in:
Ian Roddis
2022-01-14 15:48:06 -04:00
parent 07646de2cd
commit 2784aeee28

View File

@@ -130,7 +130,15 @@ bool SSHTaskExecutor::validateTaskParameters(const ConfigValues &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;
}