Skip to content

Commit

Permalink
flex fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed May 30, 2024
1 parent 8154531 commit e5679d8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions astroquery/nrao/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,15 @@ def _get_data(self, solr_id, email=None, workflow='runBasicMsWorkflow',
resp.raise_for_status()

eb_deets = self._request('GET',
'https://data.nrao.edu/archive-service/restapi_get_full_exec_block_details',
f'{self.archive_url}/archive-service/restapi_get_full_exec_block_details',
params={'solr_id': solr_id},
cache=False
)
eb_deets.raise_for_status()
assert len(self._session.cookies) > 0

resp1b = self._request('GET',
'https://data.nrao.edu/archive-service/restapi_spw_details_view',
f'{self.archive_url}/archive-service/restapi_spw_details_view',
params={'exec_block_id': solr_id.split(":")[-1]},
cache=False
)
Expand Down Expand Up @@ -403,7 +403,7 @@ def _get_data(self, solr_id, email=None, workflow='runBasicMsWorkflow',
if instrument in ('VLA', 'EVLA'):
post_data['p_applyTelescopeFlags'] = apply_flags
casareq = self._request('GET',
'https://data.nrao.edu/archive-service/restapi_get_casa_version_list',
f'{self.archive_url}/archive-service/restapi_get_casa_version_list',
cache=False
)
casareq.raise_for_status()
Expand All @@ -413,7 +413,7 @@ def _get_data(self, solr_id, email=None, workflow='runBasicMsWorkflow',
post_data['p_casaHome'] = casav['path']

presp = self._request('POST',
'https://data.nrao.edu/rh/submission',
f'{self.archive_url}/rh/submission',
data=post_data,
cache=False
)
Expand All @@ -434,7 +434,7 @@ def _get_data(self, solr_id, email=None, workflow='runBasicMsWorkflow',
wait_url = nextresp.url
nextresp.raise_for_status()

if 'https://data.nrao.edu/rh/requests/' not in wait_url:
if f'{self.archive_url}/rh/requests/' not in wait_url:
raise ValueError(f"Got wrong URL from post request: {wait_url}")

# to get the right format of response, you need to specify this:
Expand All @@ -448,7 +448,7 @@ def _get_data(self, solr_id, email=None, workflow='runBasicMsWorkflow',
if resp.text == 'COMPLETE':
break

return resp
return wait_url



Expand Down

0 comments on commit e5679d8

Please sign in to comment.