-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Research why published MUR was missing from site and resolve #4592
Comments
Reloaded manually in
Appears on
Celery SQL:
|
Per the issue body the "verification" link https://www.fec.gov/data/legal/search/enforcement/?case_no=7594 gives results But https://www.fec.gov/data/legal/search/murs/?search_type=murs&search=&case_no=7954&case_respondents=&case_min_open_date=&case_max_open_date=&case_min_close_date=&case_max_close_date= gives no results |
Thanks @pkfec for your awesome tutorial on using kibana--I was able to find the following error in stage:
Will continue investigating on the db side and then coordinate appropriately. cc @patphongs @PaulClark2 to recognize Priya's instruction as invaluable and timesaving. |
from
|
and
|
def get_elasticsearch_connection():
es_conn = env.get_service(name='fec-api-search56')
if es_conn:
url = es_conn.get_url(url='uri')
else:
url = 'http://localhost:9200'
es = Elasticsearch(url, timeout=30, max_retries=10, retry_on_timeout=True)
return es |
es.index('docs_index', get_es_type(case_type), case, id=case['doc_id']) |
SELECT
doc.document_id,
mur.case_no,
mur.case_type,
doc.filename,
doc.category,
doc.description,
doc.ocrtext,
doc.fileimage,
length(fileimage)
AS length, doc.doc_order_id, doc.document_date
FROM fecmur.document doc
INNER JOIN fecmur.cases_with_parsed_case_serial_numbers_vw mur
ON mur.case_id = doc.case_id
WHERE mur.case_no = '7594' AND doc.document_id='100495928'
ORDER BY doc.doc_order_id, doc.document_date desc, doc.document_id DESC; ==>
|
SELECT
doc.document_id,
mur.case_no,
mur.case_type,
doc.filename,
doc.category,
doc.description,
doc.ocrtext,
doc.fileimage,
length(fileimage)
AS length, doc.doc_order_id, doc.document_date
FROM fecmur.document doc
INNER JOIN fecmur.cases_with_parsed_case_serial_numbers_vw mur
ON mur.case_id = doc.case_id
WHERE mur.case_no = '7594' AND doc.fileimage is NULL
ORDER BY doc.doc_order_id, doc.document_date desc, doc.document_id DESC; found several missing fileimages. |
verified in prod, stage, and dev that for every MUR in particular db, there is a corresponding publication of that MUR on our particular website env, except for 7594, which is missing from stage and dev website (Laura manually uploaded to prod). imagefiles appear missing from the respective dbs. I have a request out to the contractor to discuss process. Folks reading this: please do not manually add to stage or dev as I would like to use this case as a test. Prod is no longer affected after the manual upload. |
call set for 11 a.m. today |
asked contractor to reload data in stage only to verify that celery picks the task up. There was redis maintenance today which affected celery. |
summary of findings:
logger.info("TEST get_documents BEFORE rs {0}" .format(case_id)) # YES MUR case id 60000002999600
rs = conn.execute(CASE_DOCUMENTS, case_id)
SELECT doc.document_id,
mur.case_no,
mur.case_type,
doc.filename,
doc.category,
doc.description,
doc.ocrtext,
doc.fileimage,
length(fileimage)
AS length, doc.doc_order_id, doc.document_date
FROM fecmur.document doc
INNER JOIN fecmur.cases_with_parsed_case_serial_numbers_vw mur
ON mur.case_id = doc.case_id
WHERE doc.case_id = '60000002999600'
ORDER BY doc.doc_order_id, doc.document_date desc, doc.document_id DESC;
logger.info("TEST get_documents AFTER rs {0}" .format(case_id)) # NO MUR case id 60000002999600 |
checking logs reveals for the MUR the following was raised:
|
The last environment to have the entire MUR successfully loaded was The issue was that 1G celery-worker memory was not enough and the process errored out. Opened issue #4638 to have team discussion on technical approach to strategically manage celery-worker memory. |
From contractor:
We published MUR 7594 and are able to see the data in the PG, but are not able to find the case on the website. Can you please look into this and let us know of any issues.
See follow-up instructions in comment below.
Verified: https://www.fec.gov/data/legal/search/enforcement/?case_no=7594
Following is the query we used:
Completion criteria:
The text was updated successfully, but these errors were encountered: