Issue Number | 4545 |
---|---|
Summary | Error Message in PubStatus Report |
Created | 2018-11-02 18:42:20 |
Issue Type | Bug |
Submitted By | Englisch, Volker (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2019-07-10 16:49:57 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.235508 |
Anne Middleswarth reported that the first link in the Pubstatus report of the nightly/weekly publishing notification returns the following error:
Failure getting IDs for removed docs: Invalid object name '#removed_docs'.
It's the first link of the email "[PROD] Status and Error Report for
Weekly Publishing":
Publishing Job Summary Report:
https://cdr.cancer.gov/cgi-bin/cdr/PubStatus.py?id=16818&type=Report&Session=Guest
This is the result of yet another bug in Microsoft's ADO/DB. Here's a patch:
--git a/Inetpub/wwwroot/cgi-bin/cdr/PubStatus.py b/Inetpub/wwwroot/cgi-bin/cdr/PubStatus.py
diff .571764ea 100644
index c6ed2a1f.--- a/Inetpub/wwwroot/cgi-bin/cdr/PubStatus.py
+++ b/Inetpub/wwwroot/cgi-bin/cdr/PubStatus.py
@@ -3,10 +3,11 @@
#
# OCECDR-3695: PubStatus Report Drops Push Job
#----------------------------------------------------------------------
-import cgi, cdr, cdrdb, cdrcgi, re, time
+import cgi, cdr, cdrcgi, re, time
+from cdrapi import db as cdrdb
# Logfile is same as that used in cdrpub.py
-LOG = "d:/cdr/log/publish.log"
+LOG = cdr.WORK_DRIVE + ":/cdr/log/publish.log"
= "Waiting user approval"
WAIT_STATUS
#----------------------------------------------------------------------
@@ -55,7 +56,7 @@ def dispJobStatus():
# Find some interesting information.
#----------------------------------------------------------------------
try:
- conn = cdrdb.connect('CdrGuest')
+ conn = cdrdb.connect(user='CdrGuest')
= conn.cursor()
cursor """\
cursor.execute( SELECT d.title,
@@ -188,7 +189,7 @@ def dispFilterFailures(flavor = 'full'):
# Find some interesting information.
#----------------------------------------------------------------------
try:
- conn = cdrdb.connect('CdrGuest')
+ conn = cdrdb.connect(user='CdrGuest')
cursor = conn.cursor()
cursor.execute("""\
SELECT ppd.doc_id,@@ -294,7 +295,7 @@ def dispJobSetting():
# Find some interesting information.
#----------------------------------------------------------------------
try:
- conn = cdrdb.connect('CdrGuest')
+ conn = cdrdb.connect(user='CdrGuest')
= conn.cursor()
cursor """\
cursor.execute( SELECT ppp.parm_name,
@@ -436,7 +437,7 @@ def dispCgWork():
buttons = []
header = cdrcgi.header(title, title, instr, None, buttons)
- conn = cdrdb.connect('CdrGuest')
+ conn = cdrdb.connect(user='CdrGuest')
cursor = conn.cursor()
###
@@ -986,6 +987,7 @@ def createTemporaryPubInfoTables(cursor, conn, latestFullLoad, cgJob):
AND failure IS NULL""", cgJob)
conn.commit()except cdrdb.Error, info:
+ raise
"Failure getting IDs for removed docs: %s" % info[1][0])
cdrcgi.bail(
#------------------------------------------------------------------
@@ -1063,7 +1065,7 @@ def dispJobReport():
= "PubStatus.py"
script = cdrcgi.header(title, title, instr, script, buttons)
header
- conn = cdrdb.connect('CdrGuest')
+ conn = cdrdb.connect(user='CdrGuest')
= conn.cursor()
cursor
@@ -1408,7 +1410,7 @@ def dispJobRepDetail():
= "PubStatus.py"
script = cdrcgi.header(title, title, instr, script, buttons)
header
- conn = cdrdb.connect('CdrGuest')
+ conn = cdrdb.connect(user='CdrGuest')
= conn.cursor()
cursor = "Push_Documents_To_Cancer.Gov_"
pushJobName
Fixed on DEV.
The changes are on PROD.
Elapsed: 0:00:00.001571