Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geomag-algorithms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
ghsc
National Geomagnetism Program
geomag-algorithms
Commits
054fb71d
Commit
054fb71d
authored
6 years ago
by
Jeremy M Fee
Browse files
Options
Downloads
Patches
Plain Diff
Improve logging when using observatory-foreach
parent
e14fa66a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
geomagio/Controller.py
+17
-4
17 additions, 4 deletions
geomagio/Controller.py
with
17 additions
and
4 deletions
geomagio/Controller.py
+
17
−
4
View file @
054fb71d
...
@@ -210,13 +210,15 @@ class Controller(object):
...
@@ -210,13 +210,15 @@ class Controller(object):
if
options
.
update_limit
!=
0
:
if
options
.
update_limit
!=
0
:
if
update_count
>=
options
.
update_limit
:
if
update_count
>=
options
.
update_limit
:
return
return
print
(
'
checking gaps
'
,
options
.
starttime
,
options
.
endtime
,
file
=
sys
.
stderr
)
algorithm
=
self
.
_algorithm
algorithm
=
self
.
_algorithm
input_channels
=
options
.
inchannels
or
\
input_channels
=
options
.
inchannels
or
\
algorithm
.
get_input_channels
()
algorithm
.
get_input_channels
()
output_observatory
=
options
.
output_observatory
output_channels
=
options
.
outchannels
or
\
output_channels
=
options
.
outchannels
or
\
algorithm
.
get_output_channels
()
algorithm
.
get_output_channels
()
print
(
'
checking gaps
'
,
options
.
starttime
,
options
.
endtime
,
output_observatory
,
output_channels
,
file
=
sys
.
stderr
)
# request output to see what has already been generated
# request output to see what has already been generated
output_timeseries
=
self
.
_get_output_timeseries
(
output_timeseries
=
self
.
_get_output_timeseries
(
observatory
=
options
.
output_observatory
,
observatory
=
options
.
output_observatory
,
...
@@ -258,7 +260,8 @@ class Controller(object):
...
@@ -258,7 +260,8 @@ class Controller(object):
options
.
starttime
=
output_gap
[
0
]
options
.
starttime
=
output_gap
[
0
]
options
.
endtime
=
output_gap
[
1
]
options
.
endtime
=
output_gap
[
1
]
print
(
'
processing
'
,
options
.
starttime
,
options
.
endtime
,
print
(
'
processing
'
,
options
.
starttime
,
options
.
endtime
,
file
=
sys
.
stderr
)
output_observatory
,
output_channels
,
file
=
sys
.
stderr
)
self
.
run
(
options
,
input_timeseries
)
self
.
run
(
options
,
input_timeseries
)
...
@@ -493,10 +496,20 @@ def main(args):
...
@@ -493,10 +496,20 @@ def main(args):
if
args
.
observatory_foreach
:
if
args
.
observatory_foreach
:
observatory
=
args
.
observatory
observatory
=
args
.
observatory
observatory_exception
=
None
for
obs
in
observatory
:
for
obs
in
observatory
:
args
.
observatory
=
(
obs
,)
args
.
observatory
=
(
obs
,)
args
.
output_observatory
=
(
obs
,)
args
.
output_observatory
=
(
obs
,)
_main
(
args
)
try
:
_main
(
args
)
except
Exception
as
e
:
print
(
"
Exception processing observatory {}
"
.
format
(
obs
),
str
(
e
),
file
=
sys
.
stderr
)
if
observatory_exception
:
print
(
"
Exceptions occurred during processing
"
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
else
:
else
:
_main
(
args
)
_main
(
args
)
...
...
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