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

// WIP

parent e39a5828
......@@ -10,9 +10,7 @@ use Dterumal\LaravelCluster\Events\JobCompleted;
use Dterumal\LaravelCluster\Events\JobFailed;
use Dterumal\LaravelCluster\Storage\JobModel;
use Illuminate\Support\Arr;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;
......@@ -27,7 +25,7 @@ class SlurmConnector implements ClusterInterface
if (!$process->isSuccessful()) {
if (!is_null($onError)) {
return $onError;
return $onError();
}
throw new ProcessFailedException($process);
......@@ -119,9 +117,7 @@ class SlurmConnector implements ClusterInterface
$output = $this->execute([
'sinfo',
'--format=%all'
], function () {
return [];
});
], fn() => []);
if (empty($output)) {
return [];
......
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