FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 9feb1cf9 authored by L. Bower's avatar L. Bower
Browse files

first stab at getting new runner script working

parent b4496f8a
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
SHORT=p:h
OPTS=$(getopt -a --options $SHORT -- "$@")
echo $OPTS
eval set -- "$OPTS"
while :
do
case "$1" in
-p )
component="$2"
shift 2
;;
-h | --help)
"Runs the appropriate Processor component using the -p flag, all other args are passed through"
exit 2
;;
--)
shift;
break
;;
*)
echo "Unexpected option: $1"
;;
esac
done
printf "component is %s" "$component"
if [ "$component" = "Environment" ]; then
echo "running env"
processor_class="ProcessorEnvironment.py"
elif [ "$component" = "Deposition" ];then
echo "running depo"
processor_class="ProcessorDeposition.py"
else
printf "component '%s' not recognised" "$component"
fi
# directory containing all environment
envs=/storage/app/EWS_prod/envs
......@@ -31,7 +70,9 @@ source /storage/app/miniconda3/bin/activate ${conda_env}
proc_path="$( dirname "$(readlink -f "$0" )" )"
# run the processor with all arguments
python ${proc_path}/../coordinator/Processor.py "$@"
processor=${proc_path}/../coordinator/${processor_class}
printf "processor is %s\n\n" "$processor"
python "${processor}" "$@"
exit_code=$?;
# deactivate conda environment
......
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