rda-python-common 1.0.30__tar.gz → 1.0.32__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rda-python-common might be problematic. Click here for more details.
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/PKG-INFO +1 -1
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/pyproject.toml +1 -1
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/PgDBI.py +7 -6
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/PgFile.py +1 -1
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/PgOPT.py +1 -1
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common.egg-info/PKG-INFO +1 -1
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/LICENSE +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/README.md +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/setup.cfg +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/PgCMD.py +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/PgLOG.py +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/PgLock.py +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/PgSIG.py +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/PgSplit.py +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/PgUtil.py +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common/__init__.py +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common.egg-info/SOURCES.txt +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common.egg-info/dependency_links.txt +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common.egg-info/requires.txt +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common.egg-info/top_level.txt +0 -0
- {rda_python_common-1.0.30 → rda_python_common-1.0.32}/test/test_common.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.32
|
|
4
4
|
Summary: RDA Python common library codes shared by other RDA python packages
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-common
|
|
@@ -315,13 +315,13 @@ def aborttran(autocommit = True):
|
|
|
315
315
|
#
|
|
316
316
|
# record error message to dscheck record and clean the lock
|
|
317
317
|
#
|
|
318
|
-
def record_dscheck_error(errmsg):
|
|
318
|
+
def record_dscheck_error(errmsg, logact = PGDBI['EXITLG']):
|
|
319
319
|
|
|
320
320
|
cnd = PgLOG.PGLOG['DSCHECK']['chkcnd']
|
|
321
321
|
if PgLOG.PGLOG['NOQUIT']: PgLOG.PGLOG['NOQUIT'] = 0
|
|
322
322
|
dflags = PgLOG.PGLOG['DSCHECK']['dflags']
|
|
323
323
|
|
|
324
|
-
pgrec = pgget("dscheck", "mcount, tcount, lockhost, pid", cnd,
|
|
324
|
+
pgrec = pgget("dscheck", "mcount, tcount, lockhost, pid", cnd, logact)
|
|
325
325
|
if not pgrec: return 0
|
|
326
326
|
if not pgrec['pid'] and not pgrec['lockhost']: return 0
|
|
327
327
|
(chost, cpid) = PgLOG.current_process_info()
|
|
@@ -330,8 +330,9 @@ def record_dscheck_error(errmsg):
|
|
|
330
330
|
# update dscheck record only if it is still locked by the current process
|
|
331
331
|
record = {}
|
|
332
332
|
record['chktime'] = int(time.time())
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
if logact&PgLOG.EXITLG:
|
|
334
|
+
record['status'] = "E"
|
|
335
|
+
record['pid'] = 0 # release lock
|
|
335
336
|
if dflags:
|
|
336
337
|
record['dflags'] = dflags
|
|
337
338
|
record['mcount'] = pgrec['mcount'] + 1
|
|
@@ -343,7 +344,7 @@ def record_dscheck_error(errmsg):
|
|
|
343
344
|
if pgrec['tcount'] > 1: errmsg = "Try {}: {}".format(pgrec['tcount'], errmsg)
|
|
344
345
|
record['errmsg'] = errmsg
|
|
345
346
|
|
|
346
|
-
return pgupdt("dscheck", record, cnd,
|
|
347
|
+
return pgupdt("dscheck", record, cnd, logact)
|
|
347
348
|
|
|
348
349
|
#
|
|
349
350
|
# local function to log query error
|
|
@@ -367,7 +368,7 @@ def qelog(dberror, sleep, sqlstr, vals, pgcnt, logact = PGDBI['ERRLOG']):
|
|
|
367
368
|
if vals: sqlstr += " with values: " + str(vals)
|
|
368
369
|
|
|
369
370
|
if dberror: sqlstr = "{}\n{}".format(dberror, sqlstr)
|
|
370
|
-
if logact&PgLOG.EXITLG and PgLOG.PGLOG['DSCHECK']: record_dscheck_error(sqlstr)
|
|
371
|
+
if logact&PgLOG.EXITLG and PgLOG.PGLOG['DSCHECK']: record_dscheck_error(sqlstr, logact)
|
|
371
372
|
PgLOG.pglog(sqlstr, logact)
|
|
372
373
|
if sleep: time.sleep(sleep)
|
|
373
374
|
|
|
@@ -145,7 +145,7 @@ def errlog(msg, etype, retry = 0, logact = 0):
|
|
|
145
145
|
logact |= PgLOG.EXITLG
|
|
146
146
|
ECNTS[etype] = 0
|
|
147
147
|
|
|
148
|
-
if PgLOG.PGLOG['DSCHECK'] and logact&PgLOG.EXITLG: PgDBI.record_dscheck_error(msg)
|
|
148
|
+
if PgLOG.PGLOG['DSCHECK'] and logact&PgLOG.EXITLG: PgDBI.record_dscheck_error(msg, logact)
|
|
149
149
|
PgLOG.pglog(msg, logact)
|
|
150
150
|
PgLOG.PGLOG['BCKGRND'] = bckgrnd
|
|
151
151
|
if not retry: time.sleep(PgSIG.PGSIG['ETIME'])
|
|
@@ -985,7 +985,7 @@ def action_error(errmsg, cact = None):
|
|
|
985
985
|
msg += " of " + params['DS'][0]
|
|
986
986
|
|
|
987
987
|
msg += ": " + errmsg
|
|
988
|
-
if PgLOG.PGLOG['DSCHECK']: PgDBI.record_dscheck_error(msg)
|
|
988
|
+
if PgLOG.PGLOG['DSCHECK']: PgDBI.record_dscheck_error(msg, PGOPT['extlog'])
|
|
989
989
|
PgLOG.pglog(msg, PGOPT['extlog'])
|
|
990
990
|
|
|
991
991
|
#
|
{rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.32
|
|
4
4
|
Summary: RDA Python common library codes shared by other RDA python packages
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-common
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common.egg-info/requires.txt
RENAMED
|
File without changes
|
{rda_python_common-1.0.30 → rda_python_common-1.0.32}/src/rda_python_common.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|