drms icon indicating copy to clipboard operation
drms copied to clipboard

client.export status should update on completion

Open Tom-Berger opened this issue 4 years ago • 1 comments

Here's the current behavior:

>>> import drms
>>> email = '[email protected]'
>>> client = drms.Client(email=email)
>>> hmi_query_string = 'hmi.sharp_cea_720s[377][2011.02.15_02:12:00_TAI]'
>>> r = client.export(hmi_query_string+'{Br}', protocol='fits', email=email)
export URL: http://jsoc.stanford.edu/cgi-bin/ajax/jsoc_fetch?op=exp_request&format=json&ds=hmi.sharp_cea_720s%5B377%5D%5B2011.02.15_02%3A12%3A00_TAI%5D%7BBr%7D&notify=thomas.berger%40colorado.edu&method=url&protocol=fits&filenamefmt=hmi.sharp_cea_720s.%7BHARPNUM%7D.%7BT_REC%3AA%7D.%7Bsegment%7D&process%3Dn=0&requestor=thomas.berger&sizeratio=1.0
>>> r.status
2
>>> r.status
2

At this point, the export is finished and the files are queued for download (as determined from getting the email from JSOC). However note that r.status is not updated:

>>> r.status
2

Upon completion, r.status should be 0, not 2. I think this is preventing loops which attempt repeated export requests to fail after the first request since all subsequent requests throw an immediate error of {"status":7,"error":"User [email protected] has 1 pending export requests...}

Tom-Berger avatar May 17 '21 00:05 Tom-Berger

I can still reproduce this.

Cadair avatar Nov 06 '25 15:11 Cadair