Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
intercal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Collocation
intercal
Commits
77e73982
Commit
77e73982
authored
15 years ago
by
Greg Quinn
Browse files
Options
Downloads
Patches
Plain Diff
Upload results to the DMS
parent
606abe5c
No related branches found
Branches containing commit
Tags
v1.0.1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wrapper_funnel.py
+16
-8
16 additions, 8 deletions
wrapper_funnel.py
with
16 additions
and
8 deletions
wrapper_funnel.py
+
16
−
8
View file @
77e73982
...
@@ -36,14 +36,14 @@ airs_date, airs_chunk = intercal_db.get_forward_job('funnel', execution_id)
...
@@ -36,14 +36,14 @@ airs_date, airs_chunk = intercal_db.get_forward_job('funnel', execution_id)
year
=
airs_date
[
0
:
4
]
year
=
airs_date
[
0
:
4
]
month
=
airs_date
[
5
:
7
]
month
=
airs_date
[
5
:
7
]
day
=
airs_date
[
8
:
10
]
day
=
airs_date
[
8
:
10
]
start_gran_num
=
str
(
(
airs_chunk
*
10
)
+
1
)
start_gran_num
=
(
airs_chunk
*
10
)
+
1
num_granules
=
'
10
'
num_granules
=
10
output_prefix
=
'
intercal
'
output_prefix
=
'
intercal
'
cmd
=
(
'
python
'
,
cmd
=
(
'
python
'
,
'
%s/driver.py
'
%
intercal_sw_dir
,
'
%s/driver.py
'
%
intercal_sw_dir
,
modis_sw_dir
,
modis_sw_dir
,
year
,
month
,
day
,
year
,
month
,
day
,
start_gran_num
,
num_granules
,
str
(
start_gran_num
)
,
str
(
num_granules
)
,
output_prefix
)
output_prefix
)
return_code
=
subprocess
.
call
(
cmd
)
return_code
=
subprocess
.
call
(
cmd
)
...
@@ -52,11 +52,19 @@ if return_code != 0:
...
@@ -52,11 +52,19 @@ if return_code != 0:
intercal_db
.
job_failed
(
airs_date
,
airs_chunk
)
intercal_db
.
job_failed
(
airs_date
,
airs_chunk
)
raise
Exception
(
'
driver failed with return code %s
'
%
return_code
)
raise
Exception
(
'
driver failed with return code %s
'
%
return_code
)
# FIXME: this should upload files to the DMS
# upload the files into the DMS; if any of these uploads fail,
return_code
=
subprocess
.
call
(
'
mv * /data/gregq/tmp
'
,
shell
=
True
)
# bail out
if
return_code
!=
0
:
for
i
in
range
(
10
):
intercal_db
.
job_failed
(
airs_date
,
airs_chunk
)
for
product
in
(
'
a2m
'
,
'
m2a
'
,
'
meta
'
):
raise
Exception
(
'
mv failed: %s
'
%
return_code
)
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!
# looks like everything worked!
intercal_db
.
job_done
(
airs_date
,
airs_chunk
)
intercal_db
.
job_done
(
airs_date
,
airs_chunk
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment