Skip to content
Snippets Groups Projects
Commit a7d5d474 authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Launch and stop CalParrot when running correction notebooks

parent 7cacd6f9
No related branches found
No related tags found
1 merge request!767Store CalCat requests/responses for reproducibility
...@@ -43,10 +43,26 @@ then ...@@ -43,10 +43,26 @@ then
sleep 15 sleep 15
fi fi
# Launch CalParrot to repeat calibration constant queries
if [ "$caltype" == "CORRECT" ]
then
port_file=$(mktemp)
${python_path} -m calparrot --port-file $port_file
calparrot_port=$(cat $port_file)
rm $port_file
export CAL_CAL_TOOLS_CALCAT__base-api-url="http://127.0.0.1:${calparrot_port}"
export CAL_CAL_TOOLS_CALCAT__use-oauth2=false
fi
echo "Running notebook" echo "Running notebook"
${python_path} -m princess ${nb_path} --save ${python_path} -m princess ${nb_path} --save
# Stop CalParrot
if [ "$caltype" == "CORRECT" ]
then
${python_path} -m calparrot.stop $calparrot_port
fi
# stop the cluster if requested # stop the cluster if requested
if [ "${ipcluster_profile}" != "NO_CLUSTER" ] if [ "${ipcluster_profile}" != "NO_CLUSTER" ]
then then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment