rda-python-dscheck 1.0.6__tar.gz → 1.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 (17) hide show
  1. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/PKG-INFO +1 -1
  2. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/pyproject.toml +1 -1
  3. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck/PgCheck.py +8 -12
  4. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck/dscheck.py +1 -4
  5. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck.egg-info/PKG-INFO +1 -1
  6. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/LICENSE +0 -0
  7. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/MANIFEST.in +0 -0
  8. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/README.md +0 -0
  9. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/setup.cfg +0 -0
  10. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck/__init__.py +0 -0
  11. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck/dscheck.usg +0 -0
  12. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck.egg-info/SOURCES.txt +0 -0
  13. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck.egg-info/dependency_links.txt +0 -0
  14. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck.egg-info/entry_points.txt +0 -0
  15. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck.egg-info/requires.txt +0 -0
  16. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/src/rda_python_dscheck.egg-info/top_level.txt +0 -0
  17. {rda_python_dscheck-1.0.6 → rda_python_dscheck-1.0.8}/tests/test_dscheck.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dscheck
3
- Version: 1.0.6
3
+ Version: 1.0.8
4
4
  Summary: RDA python package to add and process batch jobs
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dscheck
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rda_python_dscheck"
7
- version = "1.0.6"
7
+ version = "1.0.8"
8
8
  authors = [
9
9
  { name="Zaihua Ji", email="zji@ucar.edu" },
10
10
  ]
@@ -367,13 +367,11 @@ def start_dschecks(cnd, logact = 0):
367
367
 
368
368
  rcnt = 0
369
369
  check_dscheck_locks(cnd, logact)
370
- if not CHKHOST['chkhost']: email_dschecks(cnd, logact)
370
+ email_dschecks(cnd, logact)
371
371
  purge_dschecks(cnd, logact)
372
372
 
373
- # if 'NC' in PgOPT.params or not CHKHOST['chkhost']: return 0
374
373
  if 'NC' in PgOPT.params: return 0
375
374
  if CHKHOST['isbatch'] and 'CP' in PgOPT.params: check_dscheck_pends(cnd, logact)
376
- # set_dscheck_options(CHKHOST['chkhost'], cnd, logact)
377
375
  reset_process_limits()
378
376
  if CHKHOST['isbatch']: rcnt = PgDBI.pgget("dscheck", "", "lockhost = '{}' AND pid > 0".format(PgLOG.PGLOG['PBSNAME']), logact)
379
377
 
@@ -407,7 +405,7 @@ def check_dscheck_locks(cnd, logact = 0):
407
405
  dtime = ltime - PgSIG.PGSIG['DTIME']
408
406
  ctime = ltime - PgSIG.PGSIG['CTIME']
409
407
  rtime = ltime - PgSIG.PGSIG['RTIME']
410
- cnd += "chktime > 0 AND (chktime < {} OR chktime < {} AND lockhost = '{}' OR chktime < {} AND lockhost = 'rda_config')".format(ctime, dtime, lochost, rtime)
408
+ cnd += "chktime > 0 AND (chktime < {} OR chktime < {} AND lockhost {} OR chktime < {} AND lockhost = 'rda_config')".format(ctime, dtime, CHKHOST['hostcond'], rtime)
411
409
 
412
410
  pgrecs = PgDBI.pgmget("dscheck", "*", cnd, logact)
413
411
  cnt = (len(pgrecs['cindex']) if pgrecs else 0)
@@ -927,8 +925,7 @@ def skip_dscheck_record(pgrec, host, logact = 0):
927
925
  def start_dsrqsts(cnd, logact = 0):
928
926
 
929
927
  check_dsrqst_locks(cnd, logact)
930
- # if CHKHOST['chkhost']: return 1
931
- if not CHKHOST['chkhost']: email_dsrqsts(cnd, logact)
928
+ email_dsrqsts(cnd, logact)
932
929
  purge_dsrqsts(cnd, logact)
933
930
  rcnd = cnd
934
931
  rcnd += ("status = 'Q' AND rqsttype <> 'C' AND (pid = 0 OR pid < ptcount) AND " +
@@ -1100,7 +1097,7 @@ def check_dsrqst_locks(cnd, logact = 0):
1100
1097
  dtime = ltime - PgSIG.PGSIG['DTIME']
1101
1098
  ctime = ltime - PgSIG.PGSIG['CTIME']
1102
1099
  rtime = ltime - PgSIG.PGSIG['RTIME']
1103
- cnd += "locktime > 0 AND (locktime < {} OR locktime < {} AND lockhost = '{}' OR locktime < {} AND lockhost = 'rda_config')".format(ctime, dtime, lochost, rtime)
1100
+ cnd += "locktime > 0 AND (locktime < {} OR locktime < {} AND lockhost {} OR locktime < {} AND lockhost = 'rda_config')".format(ctime, dtime, CHKHOST['hostcond'], rtime)
1104
1101
  check_partition_locks(cnd, ltime, logact) # check partitions first
1105
1102
 
1106
1103
  pgrecs = PgDBI.pgmget("dsrqst", "rindex, lockhost, pid, locktime", cnd, logact)
@@ -1242,9 +1239,8 @@ def start_dsupdts(cnd, logact = 0):
1242
1239
 
1243
1240
  ctime = PgUtil.curtime(1)
1244
1241
  check_dsupdt_locks(cnd, logact)
1245
- if not CHKHOST['chkhost']:
1246
- email_dsupdt_controls(cnd, logact)
1247
- email_dsupdts(cnd, logact)
1242
+ email_dsupdt_controls(cnd, logact)
1243
+ email_dsupdts(cnd, logact)
1248
1244
 
1249
1245
  cnd += "pid = 0 and cntltime <= '{}' and action > '' AND einfo IS NULL ORDER by cntltime".format(ctime)
1250
1246
  pgrecs = PgDBI.pgmget("dcupdt", "*", cnd, logact)
@@ -1308,7 +1304,7 @@ def check_dsupdt_locks(ocnd, logact = 0):
1308
1304
  cnd = ocnd + "pid > 0 AND "
1309
1305
  ctime = ltime - 4*PgSIG.PGSIG['CTIME']
1310
1306
  rtime = ltime - PgSIG.PGSIG['RTIME']
1311
- cnd += "chktime > 0 AND (chktime < {} OR chktime < {} AND lockhost = '{}' OR chktime < {} AND lockhost = 'rda_config')".format(ctime, dtime, lochost, rtime)
1307
+ cnd += "chktime > 0 AND (chktime < {} OR chktime < {} AND lockhost {} OR chktime < {} AND lockhost = 'rda_config')".format(ctime, dtime, CHKHOST['hostcond'], rtime)
1312
1308
 
1313
1309
  pgrecs = PgDBI.pgmget("dcupdt", "cindex, lockhost, pid, chktime", cnd, logact)
1314
1310
  cnt = (len(pgrecs['cindex']) if pgrecs else 0)
@@ -1339,7 +1335,7 @@ def check_dsupdt_locks(ocnd, logact = 0):
1339
1335
  if cnt > 1: PgLOG.pglog("{} of {} DSUPDT Controls unlocked on {}".format(lcnt, cnt, PgLOG.PGLOG['HOSTNAME']), PgLOG.WARNLG)
1340
1336
 
1341
1337
  cnd = ocnd + "pid > 0 AND locktime > 0 AND "
1342
- cnd += "(locktime < {} OR locktime < {} AND hostname = '{}' OR locktime < {} AND hostname = 'rda_config')".format(ctime, dtime, lochost, rtime)
1338
+ cnd += "(locktime < {} OR locktime < {} AND hostname {} OR locktime < {} AND hostname = 'rda_config')".format(ctime, dtime, CHKHOST['hostcond'], rtime)
1343
1339
 
1344
1340
  pgrecs = PgDBI.pgmget("dlupdt", "lindex, hostname, pid, locktime", cnd, logact)
1345
1341
  cnt = (len(pgrecs['lindex']) if pgrecs else 0)
@@ -602,10 +602,7 @@ def handle_dschecks():
602
602
  def send_error_email():
603
603
 
604
604
  msg = "Error message for DSCHECK on " + PgLOG.PGLOG['HOSTNAME']
605
-
606
- PgLOG.set_email(msg, PgLOG.EMLTOP)
607
- msg = PgLOG.send_email(msg)
608
- PgLOG.pglog(msg, PgLOG.MSGLOG|PgLOG.FRCLOG)
605
+ PgLOG.send_email(msg)
609
606
 
610
607
  #
611
608
  # prepare a summary string for quit
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_dscheck
3
- Version: 1.0.6
3
+ Version: 1.0.8
4
4
  Summary: RDA python package to add and process batch jobs
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-dscheck