Change-Id: I464af54151ba8a80c5adbbe44deb52d210931490 Former-commit-id: e6b54b462c0088b02b3666c004e4209649ed2881
This commit is contained in:
parent
9f6958d69b
commit
9861e27263
2 changed files with 28 additions and 3 deletions
|
@ -17,8 +17,21 @@ class nwpsCG1Forecaster(Forecaster):
|
|||
|
||||
def main():
|
||||
nwpsCG1Forecaster().run()
|
||||
chkfile = "/tmp/nwps/CG1"
|
||||
chkfiledir = "/tmp/nwps"
|
||||
try:
|
||||
os.makedirs(chkfiledir)
|
||||
except OSError:
|
||||
pass
|
||||
if not os.path.isfile(chkfile):
|
||||
open(chkfile, 'a').close()
|
||||
os.system('/awips2/GFESuite/bin/sendGfeMessage -s -m "SWAN WAVE GRIDS ARE NOW IN GFE"')
|
||||
filemodtime = os.stat(chkfile).st_mtime
|
||||
twominutesago = time.time() - 120
|
||||
if (twominutesago - filemodtime) > 0:
|
||||
os.utime(chkfile, None)
|
||||
os.system('/awips2/GFESuite/bin/sendGfeMessage -s -m "SWAN WAVE GRIDS ARE NOW IN GFE"')
|
||||
|
||||
os.system('/awips2/GFESuite/bin/sendGfeMessage -s -m "SWAN WAVE GRIDS ARE NOW IN GFE"')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
@ -57,8 +57,20 @@ class nwpsTrkngCG0Forecaster(Forecaster):
|
|||
|
||||
def main():
|
||||
nwpsTrkngCG0Forecaster().run()
|
||||
|
||||
os.system('/awips2/GFESuite/bin/sendGfeMessage -s -m "TRACKING WAVE GRIDS ARE NOW IN GFE"')
|
||||
chkfile = "/tmp/nwps/CGTrack"
|
||||
chkfiledir = "/tmp/nwps"
|
||||
try:
|
||||
os.makedirs(chkfiledir)
|
||||
except OSError:
|
||||
pass
|
||||
if not os.path.isfile(chkfile):
|
||||
open(chkfile, 'a').close()
|
||||
os.system('/awips2/GFESuite/bin/sendGfeMessage -s -m "TRACKING WAVE GRIDS ARE NOW IN GFE"')
|
||||
filemodtime = os.stat(chkfile).st_mtime
|
||||
twominutesago = time.time() - 120
|
||||
if (twominutesago - filemodtime) > 0:
|
||||
os.utime(chkfile, None)
|
||||
os.system('/awips2/GFESuite/bin/sendGfeMessage -s -m "TRACKING WAVE GRIDS ARE NOW IN GFE"')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
Loading…
Add table
Reference in a new issue