Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AossTower
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
MetObs
AossTower
Commits
228c283f
Commit
228c283f
authored
10 years ago
by
Bruce Flynn
Browse files
Options
Downloads
Patches
Plain Diff
Fix script for new model code
parent
c8f18830
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/make_database.py
+4
-11
4 additions, 11 deletions
scripts/make_database.py
with
4 additions
and
11 deletions
scripts/make_database.py
+
4
−
11
View file @
228c283f
...
...
@@ -5,8 +5,8 @@ import logging
from
datetime
import
datetime
from
metobscommon.model
import
RrdModel
,
ModelError
from
aosstower.
record
import
Record
,
LineParseError
from
aosstower.
model
import
initialize_rrd
,
VARS
from
aosstower.
l00.parser
import
read_records
from
aosstower.
l00.rrd
import
initialize_rrd
LOG
=
logging
...
...
@@ -41,6 +41,7 @@ if __name__ == '__main__':
LOG
.
info
(
"
Enter time ordered data files, one per line, ^D when done
"
)
args
.
files
=
sys
.
stdin
for
each
in
args
.
files
.
readlines
():
fpath
=
each
.
strip
()
if
not
os
.
path
.
exists
(
fpath
):
...
...
@@ -48,15 +49,7 @@ if __name__ == '__main__':
continue
LOG
.
info
(
"
adding %s
"
,
fpath
)
for
line
in
open
(
fpath
).
readlines
():
if
not
line
.
strip
():
continue
try
:
record
=
Record
.
create
(
line
)
except
LineParseError
as
err
:
LOG
.
error
(
str
(
err
))
continue
for
record
in
read_records
(
fpath
):
try
:
rrd
.
add_record
(
record
[
'
stamp
'
],
record
)
except
ModelError
:
...
...
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