@@ -250,27 +250,32 @@ robust of long-running queries. It also supports queuing queries,
250250which allows service operators to be a lot more generous with
251251resource limits.
252252
253- To specify the query mode, you can use either ``run_sync() `` for
254- synchronous query or ``run_async() `` for asynchronous query.
253+ For most long-running queries, ``run_async() `` should generally be the
254+ preferred approach. It submits the job, waits for it to complete, and returns
255+ the result in one call:
256+
257+ .. doctest-remote-data ::
258+
259+ >>> result = tap_service.run_async(ex_query)
260+
261+ For more control over the job lifecycle, for example to set a
262+ custom execution time limit, inspect the job URL, or manage the job
263+ manually you can use the ``submit_job() `` workflow instead. This submits an
264+ asynchronous query without starting it, returning an
265+ :py:class: `~pyvo.dal.AsyncTAPJob ` object:
255266
256267.. doctest-remote-data ::
257268
258269 >>> job = tap_service.submit_job(ex_query)
259270
260- To learn more details from the asynchronous query, let's look at the
261- ``submit_job() `` method. This submits an asynchronous query without
262- starting it, it creates a new object :py:class: `~pyvo.dal.AsyncTAPJob `.
271+ The job URL is in the ``url `` attribute and can be used to inspect or
272+ manage the job. The same is available programmatically via various attributes:
263273
264274.. doctest-remote-data ::
265275
266276 >>> job.url
267277 'http://dc.g-vo.org/__system__/tap/run/async/...'
268278
269- The job URL mentioned before is available in the ``url `` attribute.
270- Clicking on the URL leads you to the query itself, where you can check
271- the status(phase) of the query and decide to run, modify or delete
272- the job. You can also do it via various attributes:
273-
274279.. doctest-remote-data ::
275280
276281 >>> job.phase
@@ -332,10 +337,6 @@ that you can change if you need to) is reached.
332337For more attributes please read the description for the job object
333338:py:class: `~pyvo.dal.AsyncTAPJob `.
334339
335- With ``run_async() `` you basically submit an asynchronous query and
336- return its result. It is like running ``submit_job() `` first and then
337- run the query manually.
338-
339340Query limit
340341^^^^^^^^^^^
341342
0 commit comments