Merge "Omaha #3318 split deltascript one for dx1 the other for dx2." into omaha_14.4.1
Former-commit-id:32cbdfff27
[formerly122cf829d1
] [formerly45c070c2d9
[formerly 8e9c405183b7f85fc72f1d5a3bbbfd3e02e026b3]] Former-commit-id:45c070c2d9
Former-commit-id:e152bc9a6a
This commit is contained in:
commit
55e65f5b2e
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