mirror of https://gitee.com/bigwinds/arangodb
35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
shell> curl -X POST --header 'x-arango-async: store' --data-binary @- --dump - http://localhost:8529/_api/cursor <<EOF
|
|
{
|
|
<span class="hljs-string">"query"</span> : <span class="hljs-string">"FOR i IN 1..10 FOR j IN 1..10 LET x = sleep(1.0) FILTER i == 5 && j == 5 RETURN 42"</span>
|
|
}
|
|
EOF
|
|
|
|
HTTP/1.1 202 Accepted
|
|
content-type: text/plain; charset=utf-8
|
|
x-arango-async-id: 146641305616398
|
|
|
|
shell> curl --dump - http://localhost:8529/_api/job/pending
|
|
|
|
HTTP/<span class="hljs-number">1.1</span> <span class="hljs-number">200</span> OK
|
|
content-type: application/json; charset=utf<span class="hljs-number">-8</span>
|
|
|
|
[
|
|
<span class="hljs-string">"146641305616398"</span>
|
|
]
|
|
shell> curl -X PUT --dump - http://localhost:8529/_api/job/146641305616398/cancel
|
|
|
|
HTTP/<span class="hljs-number">1.1</span> <span class="hljs-number">200</span> OK
|
|
content-type: application/json; charset=utf<span class="hljs-number">-8</span>
|
|
|
|
{
|
|
<span class="hljs-string">"result"</span> : <span class="hljs-literal">true</span>
|
|
}
|
|
shell> curl --dump - http://localhost:8529/_api/job/pending
|
|
|
|
HTTP/<span class="hljs-number">1.1</span> <span class="hljs-number">200</span> OK
|
|
content-type: application/json; charset=utf<span class="hljs-number">-8</span>
|
|
|
|
[
|
|
<span class="hljs-string">"146641305616398"</span>
|
|
]
|