rda-python-common 2.0.6__tar.gz → 2.0.8__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.
Files changed (33) hide show
  1. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/PKG-INFO +1 -1
  2. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/pyproject.toml +1 -1
  3. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/PgDBI.py +5 -4
  4. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_dbi.py +5 -4
  5. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_file.py +2 -1
  6. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common.egg-info/PKG-INFO +1 -1
  7. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/LICENSE +0 -0
  8. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/README.md +0 -0
  9. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/setup.cfg +0 -0
  10. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/PgCMD.py +0 -0
  11. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/PgFile.py +0 -0
  12. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/PgLOG.py +0 -0
  13. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/PgLock.py +0 -0
  14. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/PgOPT.py +0 -0
  15. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/PgSIG.py +0 -0
  16. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/PgSplit.py +0 -0
  17. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/PgUtil.py +0 -0
  18. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/__init__.py +0 -0
  19. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_cmd.py +0 -0
  20. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_lock.py +0 -0
  21. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_log.py +0 -0
  22. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_opt.py +0 -0
  23. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_password.py +0 -0
  24. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_sig.py +0 -0
  25. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_split.py +0 -0
  26. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pg_util.py +0 -0
  27. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common/pgpassword.py +0 -0
  28. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common.egg-info/SOURCES.txt +0 -0
  29. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common.egg-info/dependency_links.txt +0 -0
  30. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common.egg-info/entry_points.txt +0 -0
  31. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common.egg-info/requires.txt +0 -0
  32. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/src/rda_python_common.egg-info/top_level.txt +0 -0
  33. {rda_python_common-2.0.6 → rda_python_common-2.0.8}/test/test_common.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_common
3
- Version: 2.0.6
3
+ Version: 2.0.8
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rda_python_common"
7
- version = "2.0.6"
7
+ version = "2.0.8"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -323,11 +323,12 @@ def aborttran(autocommit = True):
323
323
  #
324
324
  def record_dscheck_error(errmsg, logact = PGDBI['EXITLG']):
325
325
 
326
- cnd = PgLOG.PGLOG['DSCHECK']['chkcnd']
326
+ check = PgLOG.PGLOG['DSCHECK']
327
+ chkcnd = check['chkcnd'] if 'chkcnd' in check else "cindex = {}".format(check['cindex'])
328
+ dflags = check['dflags'] if 'dflags' in check else ''
327
329
  if PgLOG.PGLOG['NOQUIT']: PgLOG.PGLOG['NOQUIT'] = 0
328
- dflags = PgLOG.PGLOG['DSCHECK']['dflags']
329
330
 
330
- pgrec = pgget("dscheck", "mcount, tcount, lockhost, pid", cnd, logact)
331
+ pgrec = pgget("dscheck", "mcount, tcount, lockhost, pid", chkcnd, logact)
331
332
  if not pgrec: return 0
332
333
  if not pgrec['pid'] and not pgrec['lockhost']: return 0
333
334
  (chost, cpid) = PgLOG.current_process_info()
@@ -350,7 +351,7 @@ def record_dscheck_error(errmsg, logact = PGDBI['EXITLG']):
350
351
  if pgrec['tcount'] > 1: errmsg = "Try {}: {}".format(pgrec['tcount'], errmsg)
351
352
  record['errmsg'] = errmsg
352
353
 
353
- return pgupdt("dscheck", record, cnd, logact)
354
+ return pgupdt("dscheck", record, chkcnd, logact)
354
355
 
355
356
  #
356
357
  # local function to log query error
@@ -248,10 +248,11 @@ class PgDBI(PgLOG):
248
248
  # record error message to dscheck record and clean the lock
249
249
  def record_dscheck_error(self, errmsg, logact = None):
250
250
  if logact is None: logact = self.PGDBI['EXITLG']
251
- cnd = self.PGLOG['DSCHECK']['chkcnd']
251
+ check = PgLOG.PGLOG['DSCHECK']
252
+ chkcnd = check['chkcnd'] if 'chkcnd' in check else "cindex = {}".format(check['cindex'])
253
+ dflags = check['dflags'] if 'dflags' in check else ''
252
254
  if self.PGLOG['NOQUIT']: self.PGLOG['NOQUIT'] = 0
253
- dflags = self.PGLOG['DSCHECK']['dflags']
254
- pgrec = self.pgget("dscheck", "mcount, tcount, lockhost, pid", cnd, logact)
255
+ pgrec = self.pgget("dscheck", "mcount, tcount, lockhost, pid", chkcnd, logact)
255
256
  if not pgrec: return 0
256
257
  if not pgrec['pid'] and not pgrec['lockhost']: return 0
257
258
  (chost, cpid) = self.current_process_info()
@@ -271,7 +272,7 @@ class PgDBI(PgLOG):
271
272
  errmsg = self.break_long_string(errmsg, 512, None, 50, None, 50, 25)
272
273
  if pgrec['tcount'] > 1: errmsg = "Try {}: {}".format(pgrec['tcount'], errmsg)
273
274
  record['errmsg'] = errmsg
274
- return self.pgupdt("dscheck", record, cnd, logact)
275
+ return self.pgupdt("dscheck", record, chkcnd, logact)
275
276
 
276
277
  # local function to log query error
277
278
  def qelog(self, dberror, sleep, sqlstr, vals, pgcnt, logact = None):
@@ -59,6 +59,7 @@ class PgFile(PgUtil, PgSIG):
59
59
  'tar.bz2' : ['tar -cvjf', 'tar -xvf', 'TAR.BZ2']
60
60
  }
61
61
  self.TARSTR = '|'.join(self.PGTARS)
62
+ self.DELDIRS = {}
62
63
  self.TASKIDS = {} # cache unfinished
63
64
  self.LHOST = "localhost"
64
65
  self.OHOST = self.PGLOG['OBJCTSTR']
@@ -67,6 +68,7 @@ class PgFile(PgUtil, PgSIG):
67
68
  self.OBJCTCMD = "isd_s3_cli"
68
69
  self.BACKCMD = "dsglobus"
69
70
  self.DIRLVLS = 0
71
+ self.BFILES = {} # cache backup file names and dates for each bid
70
72
  # record how many errors happen for working with HPSS, local or remote machines
71
73
  self.ECNTS = {'D' : 0, 'H' : 0, 'L' : 0, 'R' : 0, 'O' : 0, 'B' : 0}
72
74
  # up limits for how many continuing errors allowed
@@ -105,7 +107,6 @@ class PgFile(PgUtil, PgSIG):
105
107
  'gdex-quasar' : "NCAR GDEX Quasar",
106
108
  'gdex-quasar-drdata' : "NCAR GDEX Quasar DRDATA"
107
109
  }
108
- self.BFILES = {} # cache backup file names and dates for each bid
109
110
 
110
111
  # reset the up limit for a specified error type
111
112
  def reset_error_limit(self, etype, lmt):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_common
3
- Version: 2.0.6
3
+ Version: 2.0.8
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