astropy / pyvo

An Astropy affiliated package providing access to remote data and services of the Virtual Observatory (VO) using Python.
https://pyvo.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
75 stars 52 forks source link

Async TAP appears to hang when querying ESAC Gaia #535

Closed msdemlei closed 3 months ago

msdemlei commented 6 months ago

At this moment, the program

import pyvo

srv = pyvo.dal.TAPService("https://gea.esac.esa.int/tap-server/tap")
job = srv.submit_job("""SELECT ra, dec, u_mag, g_mag, r_mag, i_mag, z_mag
        FROM gaiadr1.sdssdr9_original_valid
        WHERE 1=CONTAINS(
                      POINT('ICRS', ra, dec),
                      CIRCLE('ICRS', 30, 10, 0.2))""")
job.run()
print("Now deleting")
job.delete()

prints Now deleting and then appears to do nothing for a long time.

What it actually does is download the whole joblist, as instructed by the redirect returned by the UWS delete action. This may (and does at this time) take a lot of time; many seconds, in fact.

Fortunately, there is no reason to do any joblist fetching at all (all we are interested in here is whether we get a 4xx or 5xx codes). I will prepare a PR to keep pyVO from doing so.

msdemlei commented 3 months ago

No longer pulling the joblist fixes this problem.