run and find job with sha

This commit is contained in:
andreas 2023-10-02 20:45:55 +02:00
parent abf79dd022
commit 43dd2059b7
2 changed files with 3 additions and 2 deletions

View File

@ -77,10 +77,11 @@ import fileDownload from "https://cdn.skypack.dev/js-file-download@0.4.12"
fetchJson(API,{api:'status',pipeline:currentPipeline}) fetchJson(API,{api:'status',pipeline:currentPipeline})
.then((st)=>{ .then((st)=>{
if (queryPipeline !== currentPipeline) return; if (queryPipeline !== currentPipeline) return;
if (st.status === undefined) st.status=st.state;
setValues(st); setValues(st);
setVisible('status_url',st.status_url !== undefined,true); setVisible('status_url',st.status_url !== undefined,true);
setVisible('error',st.error !== undefined,true); setVisible('error',st.error !== undefined,true);
if (st.status === 'error' || st.state === 'errored'){ if (st.status === 'error' || st.status === 'errored'){
setRunning(false); setRunning(false);
setVisible('download',false,true); setVisible('download',false,true);
return; return;

View File

@ -65,7 +65,7 @@ function getJobStatus($pipeline,$wf=workflowName,$job=jobName){
if (! isset($pstat['state'])){ if (! isset($pstat['state'])){
throw new Exception("state not set"); throw new Exception("state not set");
} }
if ($pstat['state'] == 'created'){ if ($pstat['state'] != 'created'){
return $pstat; return $pstat;
} }
$pipeline_id=$pstat['id']; $pipeline_id=$pstat['id'];