245
|
1 set -ex
|
|
2
|
|
3 CURL="curl -s -u alice:orthanctest"
|
|
4
|
|
5 # CARDIAC
|
|
6 job=`${CURL} http://localhost:8042/dicom-web/servers/sample/wado -d '{"Uri":"/studies/1.3.51.0.1.1.192.168.29.133.1681753.1681732","Debug":true}' | jq -r .ID`
|
|
7
|
|
8 sleep 1
|
|
9
|
|
10 ${CURL} http://localhost:8042/jobs/${job} | jq .
|
|
11 ${CURL} http://localhost:8042/jobs/${job}/pause -d '{}'
|
|
12
|
|
13 sleep 1
|
|
14
|
|
15 ${CURL} http://localhost:8042/jobs/${job} | jq .
|
|
16
|
|
17 sleep 2
|
|
18
|
|
19 ${CURL} http://localhost:8042/jobs/${job}/resume -d '{}'
|
|
20
|
|
21
|
|
22 set +x
|
|
23
|
|
24 while true
|
|
25 do
|
|
26 info=`${CURL} http://localhost:8042/jobs/${job}`
|
|
27 state=`echo $info | jq -r .State`
|
|
28
|
|
29 echo $info | jq .
|
|
30 echo $state
|
|
31 if [ $state != "Running" ]; then
|
|
32 break
|
|
33 else
|
|
34 sleep 1
|
|
35 fi
|
|
36 done
|
|
37
|