Skip to content

Commit c6e2ce6

Browse files
committed
Minor changes and bug fixes
1 parent f63a017 commit c6e2ce6

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

com/ArchiveService.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def insert_station_w_lock(cnn, StationCode, filename, lat, lon, h, x, y, z, otl)
124124
country_code=ISO3)
125125
except dbConnection.dbErrInsert as e:
126126
# another process did the insert before, ignore the error
127-
file_append('errors_pyArchiveService.log',
127+
file_append('errors_ArchiveService.log',
128128
'ON ' + datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') +
129129
' an unhandled error occurred:\n' +
130130
str(e) + '\n' +
@@ -142,10 +142,10 @@ def callback_handle(job):
142142

143143
def log_job_error(msg):
144144
tqdm.write(' -- There were unhandled errors during this batch. '
145-
'Please check errors_pyArchiveService.log for details')
145+
'Please check errors_ArchiveService.log for details')
146146

147147
# function to print any error that are encountered during parallel execution
148-
file_append('errors_pyArchiveService.log',
148+
file_append('errors_ArchiveService.log',
149149
'ON ' + datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') +
150150
' an unhandled error occurred:\n' +
151151
msg + '\n' +
@@ -414,7 +414,6 @@ def fill_event(ev, desc = None):
414414

415415
# check for unreasonable heights
416416
if ppp.h[0] > 9000 or ppp.h[0] < -400:
417-
cnn.close()
418417
raise pyRinex.pyRinexException(os.path.relpath(crinez, Config.repository_data_in) +
419418
' : unreasonable geodetic height (%.3f). '
420419
'RINEX file will not enter the archive.' % (ppp.h[0]))
@@ -442,7 +441,6 @@ def fill_event(ev, desc = None):
442441
os.path.join(retry_folder, filename),
443442
os.path.join(retry_folder, filename.replace(StationCode, match[0]['StationCode'])),
444443
StationCode, ppp.x, ppp.y, ppp.z, ppp.lat[0], ppp.lon[0], ppp.h[0])
445-
cnn.close()
446444
raise pyPPP.pyRunPPPExceptionCoordConflict(error)
447445

448446
elif len(match) > 1:
@@ -464,7 +462,6 @@ def fill_event(ev, desc = None):
464462
', '.join(['%s.%s: %.3f m' %
465463
(m['NetworkCode'], m['StationCode'], m['distance']) for m in match]),
466464
StationCode, ppp.x, ppp.y, ppp.z, ppp.lat[0], ppp.lon[0], ppp.h[0])
467-
cnn.close()
468465
raise pyPPP.pyRunPPPExceptionCoordConflict(error)
469466

470467
else:
@@ -767,7 +764,7 @@ def main():
767764
depfuncs,
768765
callback_handle,
769766
pbar,
770-
modules=('pgamit.pyRinex', 'pgamit.pyArchiveStruct', 'pgamit.pyOTL',
767+
modules=('pgamit.pyRinex', 'pgamit.pyArchiveStruct', 'pgamit.pyOTL', 'pgamit.pyPPP',
771768
'pgamit.pyStationInfo', 'pgamit.dbConnection', 'pgamit.Utils', 'pgamit.pyDate',
772769
'pgamit.pyProducts', 'pgamit.pyOptions', 'pgamit.pyEvents', 'pgamit.pyRinexName',
773770
'os', 'uuid', 'datetime', 'numpy', 'traceback', 'platform'))

pgamit/pyArchiveStruct.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def __init__(self, cnn, path_cfg=''):
4141

4242
self.keys = cnn.query('SELECT * FROM keys').dictresult()
4343
# read the station and network tables
44-
self.networks = cnn.query('SELECT * FROM networks').dictresult()
45-
self.stations = cnn.query('SELECT * FROM stations').dictresult()
44+
# self.networks = cnn.query('SELECT * FROM networks').dictresult()
45+
# self.stations = cnn.query('SELECT * FROM stations').dictresult()
4646

4747
self.Config = pyOptions.ReadOptions(os.path.join(path_cfg, 'gnss_data.cfg'))
4848

pgamit/pyJobServer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import dispy
1919
import dispy.httpd
2020

21-
DELAY = 45
21+
DELAY = 60
2222

2323

2424
def test_node(check_gamit_tables=None, check_archive=True, check_executables=True, check_atx=True, software_sync=()):

pgamit/pyRinex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def ConvertRinex(self, to_version):
569569
# most programs still don't support RINEX 3 (partially implemented in this code)
570570
# convert to RINEX 2.11 using gfzrnx_lx
571571
cmd = pyRunWithRetry.RunCommand('gfzrnx_lx -finp %s -fout %s.t -vo %i -f'
572-
% (self.rinex, self.rinex, to_version), 15, self.rootdir)
572+
% (self.rinex, self.rinex, to_version), 45, self.rootdir)
573573

574574
_, err = cmd.run_shell()
575575

@@ -1574,7 +1574,7 @@ def __add__(self, other):
15741574
# % (f1.rinex_path, f1.rinex_path, f2.rinex_path), 5)
15751575
cmd = pyRunWithRetry.RunCommand('gfzrnx_lx -finp %s %s -fout %s -vo %i'
15761576
% (f1.rinex_path, f2.rinex_path, f1.rinex_path + '.t',
1577-
int(self.rinex_version * 10) / 10), 15)
1577+
int(self.rinex_version * 10) / 10), 45)
15781578
# leave errors un-trapped on purpose (will raise an error to the parent)
15791579
out, err = cmd.run_shell()
15801580

0 commit comments

Comments
 (0)