Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "rda_python_dscheck"
version = "1.0.5"
version = "1.0.6"
authors = [
{ name="Zaihua Ji", email="[email protected]" },
]
Expand Down
20 changes: 4 additions & 16 deletions src/rda_python_dscheck/PgCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ def update_dscheck_time(pgrec, ltime, logact = 0):
info = PgSIG.get_pbs_info(pgrec['pid'], 0, logact)
if info:
stat = info['State']
if stat == 'Q': stat = 'P'
if stat != pgrec['status']: record['status'] = stat
else:
if pgrec['lockhost'] != PgLOG.PGLOG['HOSTNAME']: return # connot update dscheck time
Expand Down Expand Up @@ -810,19 +809,10 @@ def get_pbs_options(pgrec, limit = 0, logact = 0):
#
def get_pbsqueue_option(pgrec):

cidx = pgrec['cindex']
for pname in PBSQUEUES:
if PBSQUEUES[pname]:
aname = pname
else:
qname = pname
pcnt = PgDBI.pgget("dscheck", '', "status = 'P' AND pbsqueue = '{}'".format(qname))
if pcnt > 1: qname = aname
if pgrec['pbsqueue'] != qname:
PgDBI.pgexec("UPDATE dscheck SET pbsqueue = '{}' WHERE cindex = {}".format(qname, cidx))
pgrec['pbsqueue'] = qname
qname = pgrec['pbsqueue']
if qname in PBSQUEUES: return PBSQUEUES[qname]

return PBSQUEUES[qname]
return None

#
# build individual option string for given option name
Expand Down Expand Up @@ -889,9 +879,7 @@ def fill_dscheck_info(ckrec, pid, host, logact = 0):
record['pid'] = pid
if host == PgLOG.PGLOG['PBSNAME']:
info = PgSIG.get_pbs_info(pid, 0, logact, 2)
if info:
stat = info['State']
if stat == 'Q': stat = 'P'
if info: stat = info['State']
else:
record['runhost'] = PgLOG.PGLOG['HOSTNAME']
record['bid'] = 0
Expand Down