File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -66,16 +66,6 @@ export function getWorkerStatus(): Promise<BlueApiWorkerState> {
6666 return blueApiCall ( "/worker/state" ) . then ( ( res ) => res . json ( ) ) ;
6767}
6868
69- export function submitPlan (
70- planName : string ,
71- planParams : object
72- ) : Promise < string > {
73- return blueApiCall ( "/tasks" , "POST" , {
74- name : planName ,
75- params : planParams ,
76- } ) . then ( ( res ) => res . json ( ) . then ( ( res ) => res [ "task_id" ] ) ) ;
77- }
78-
7969// Note. fetch only rejects a promise on network errors, but http errors
8070// must be caught by checking the response
8171export function submitTask (
@@ -116,16 +106,6 @@ export function submitAndRunPlanImmediately(
116106 } )
117107 . catch ( ( error ) => console . log ( error ) ) ;
118108}
119- // return submitPlan(planName, planParams)
120- // .then((res) =>
121- // // TODO make sure submitPlan was succesful before then putting it to the worker
122- // // See https://github.com/DiamondLightSource/mx-daq-ui/issues/17
123- // blueApiCall("/worker/task", "PUT", { task_id: res }).then((res) =>
124- // res.json().then((res) => res["task_id"])
125- // )
126- // )
127- // .catch((error) => console.log(error));
128- // }
129109
130110export function abortCurrentPlan ( ) : Promise < BlueApiWorkerState > {
131111 return blueApiCall ( "/worker/state" , "PUT" , {
You can’t perform that action at this time.
0 commit comments