Skip to content
Snippets Groups Projects
Commit 77e73982 authored by Greg Quinn's avatar Greg Quinn
Browse files

Upload results to the DMS

parent 606abe5c
No related branches found
No related tags found
No related merge requests found
......@@ -36,14 +36,14 @@ airs_date, airs_chunk = intercal_db.get_forward_job('funnel', execution_id)
year = airs_date[0:4]
month = airs_date[5:7]
day = airs_date[8:10]
start_gran_num = str((airs_chunk * 10) + 1)
num_granules = '10'
start_gran_num = (airs_chunk * 10) + 1
num_granules = 10
output_prefix = 'intercal'
cmd = ('python',
'%s/driver.py' % intercal_sw_dir,
modis_sw_dir,
year, month, day,
start_gran_num, num_granules,
str(start_gran_num), str(num_granules),
output_prefix)
return_code = subprocess.call(cmd)
......@@ -52,11 +52,19 @@ if return_code != 0:
intercal_db.job_failed(airs_date, airs_chunk)
raise Exception('driver failed with return code %s' % return_code)
# FIXME: this should upload files to the DMS
return_code = subprocess.call('mv * /data/gregq/tmp', shell=True)
if return_code != 0:
intercal_db.job_failed(airs_date, airs_chunk)
raise Exception('mv failed: %s' % return_code)
# upload the files into the DMS; if any of these uploads fail,
# bail out
for i in range(10):
for product in ('a2m', 'm2a', 'meta'):
filename = '%s.%s.%s.%s.%s.%03d.hdf' % (output_prefix,
product,
year, month, day,
start_gran_num + i)
cmd = ('dmsput', filename)
return_code = subprocess.call(cmd)
if return_code != 0:
intercal_db.job_failed(airs_date, airs_chunk)
raise Exception(' failed: %s' % return_code)
# looks like everything worked!
intercal_db.job_done(airs_date, airs_chunk)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment