Omaha #3318 split deltascript one for dx1 the other for dx2.
Change-Id: If230b4c1bb24b4d2d9b73b357019275534803691 Former-commit-id:7075b0d56c
[formerlyba4f30e9c5
] [formerly7208fc1f29
] [formerly7208fc1f29
[formerly8ea817f6d0
]] [formerly44029681c8
[formerly7208fc1f29
[formerly8ea817f6d0
] [formerly44029681c8
[formerly abbaca59ff431f420bc700ad11de3cda89f82277]]]] Former-commit-id:44029681c8
Former-commit-id: e9c0dc5795c6193dddb226fbb684153d2a478273 [formerly 054abb02e7fd200f436f571982004d26f9950327] [formerlyd751500485
[formerly37eb414dd0
]] Former-commit-id:d751500485
Former-commit-id:861593e640
This commit is contained in:
parent
95c5efcf4f
commit
3b3bc0b45f
2 changed files with 22 additions and 10 deletions
19
deltaScripts/14.4.1/DR3318/dbupdate.sh
Executable file
19
deltaScripts/14.4.1/DR3318/dbupdate.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
# DR #3318 - this update awips.metadata.grid_info and needs to run on dx1.
|
||||
|
||||
echo 'INFO: Update gridinfo'
|
||||
|
||||
/awips2/psql/bin/psql -U awips -d metadata -c "update grid_info set
|
||||
datasetid='GEFS' where datasetid='gefs'"
|
||||
|
||||
if [ $? -ne 0 ] ; then
|
||||
echo 'ERROR unable to update database'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 'INFO: Update gridinfo successful.'
|
||||
|
||||
echo 'INFO: Has renameGefs.py been run on dx2?'
|
||||
|
||||
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
#!/usr/bin/env python
|
||||
# Convert gefs' directories to the new GEFS' directories
|
||||
# DR3318 Convert gefs' directories to the new GEFS' directories must run on dx2.
|
||||
|
||||
import h5py
|
||||
import os
|
||||
import sys
|
||||
|
||||
PSQL='/awips2/psql/bin/psql'
|
||||
|
||||
GRID_DIR= os.sep + 'awips2' + os.sep + 'edex' + os.sep + 'data' + os.sep + 'hdf5' + os.sep + 'grid'
|
||||
OLD_DIR= os.path.join(GRID_DIR, 'gefs')
|
||||
NEW_DIR= os.path.join(GRID_DIR, 'GEFS')
|
||||
|
@ -70,12 +68,7 @@ if os.path.isdir(NEW_DIR) :
|
|||
else:
|
||||
print "WARNING: %s directory not found" % (NEW_DIR)
|
||||
|
||||
print 'INFO: Update database'
|
||||
|
||||
cmd = '%s -U awips -d metadata -c "update grid_info set datasetid=%s where datasetid=%s"' % (PSQL, "'GEFS'", "'gefs'")
|
||||
if os.system(cmd) :
|
||||
print 'ERROR Unable to update database'
|
||||
exit(1)
|
||||
|
||||
print 'INFO: Updated GEFS successfully.'
|
||||
|
||||
print 'INFO: Has dbupdate.sh been run on dx1?'
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue