Commit cd3031ce authored by Dillenn Terumalai's avatar Dillenn Terumalai
Browse files

// WIP

parent fbb50708
......@@ -58,6 +58,7 @@ return [
'slurm' => [
'driver' => 'slurm',
'username' => env('CLUSTER_USERNAME'),
'sudo_account' => env('CLUSTER_SUDO_ACCOUNT')
]
],
......
......@@ -240,7 +240,13 @@ EOF",
$content
);
$process = Process::fromShellCommandline("sbatch --account=" . config('laravel-cluster.connections.slurm.username') . " --parsable $payload");
$sudoUser = config('laravel-cluster.connections.slurm.sudo_account');
if(!is_null($sudoUser)) {
$process = Process::fromShellCommandline("sudo -u $sudoUser sbatch --parsable $payload");
} else {
$process = Process::fromShellCommandline("sbatch --parsable $payload");
}
$process->run();
......
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