Closed upkarlidder closed 3 years ago
@tnadams @tonypearson I added a try
and except
in the Hash model. The code was failing previously if it did not find a hash value. Instead, I just set record to None so a new hash is created. Please validate that this is the right thing to do.
def find_item_name(name, mode=settings.FOB_METHOD):
""" get item if exists, None if not """
try:
record = Hash.objects.get(item_name=name,
fob_method=mode)
except ObjectDoesNotExist:
record = None
return record
That seems to have fixed the problem. I see logs for the new states now in extractjob. Here are sample of logs:
TX
Jun 17 20:21:37 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:29 extract_files:handle [INFO] 194:Processing: Texas, USA (TX)
Jun 17 20:21:37 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:33 extract_files:write_file [INFO] 478:Writing: TX-HB0001-1776-Y2021.txt
Jun 17 20:21:37 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:34 extract_files:write_file [INFO] 478:Writing: TX-HB0002-1776-Y2021.txt
Jun 17 20:21:37 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:35 extract_files:write_file [INFO] 478:Writing: TX-HB0003-1776-Y2021.txt
Jun 17 20:21:37 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:35 extract_files:write_file [INFO] 478:Writing: TX-HB0004-1776-Y2021.txt
Jun 17 20:21:37 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:36 extract_files:write_file [INFO] 478:Writing: TX-HB0005-1776-Y2021.txt
Jun 17 20:21:37 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:37 extract_files:write_file [INFO] 478:Writing: TX-HB0006-1776-Y2021.txt
Jun 17 20:21:37 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:37 extract_files:write_file [INFO] 478:Writing: TX-HB0007-1776-Y2021.txt
Jun 17 20:21:49 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:38 extract_files:write_file [INFO] 478:Writing: TX-HB0008-1776-Y2021.txt
Jun 17 20:21:49 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:38 extract_files:write_file [INFO] 478:Writing: TX-HB0009-1776-Y2021.txt
Jun 17 20:21:49 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:39 extract_files:write_file [INFO] 478:Writing: TX-HB0010-1776-Y2021.txt
Jun 17 20:21:49 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:39 extract_files:write_file [INFO] 478:Writing: TX-HB0011-1776-Y2021.txt
Jun 17 20:21:49 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:40 extract_files:write_file [INFO] 478:Writing: TX-HB0012-1776-Y2021.txt
Jun 17 20:21:49 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 03:21:40 extract_files:write_file [INFO] 478:Writing: TX-HB0013-1776-Y2021.txt
CA
Jun 17 19:22:04 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 02:21:58 extract_files:write_file [INFO] 478:Writing: CA-SB1308-1624-Y2020.txt
Jun 17 19:22:04 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 02:21:59 extract_files:write_file [INFO] 478:Writing: CA-SB1309-1624-Y2020.txt
Jun 17 19:22:05 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 02:22:00 extract_files:write_file [INFO] 478:Writing: CA-SB1310-1624-Y2020.txt
Jun 17 19:22:05 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 02:22:01 extract_files:write_file [INFO] 478:Writing: CA-SB1311-1624-Y2020.txt
Jun 17 19:22:05 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 02:22:02 extract_files:write_file [INFO] 478:Writing: CA-SB1312-1624-Y2020.txt
Jun 17 19:22:05 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 02:22:02 extract_files:write_file [INFO] 478:Writing: CA-SB1313-1624-Y2020.txt
Jun 17 19:22:05 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 02:22:03 extract_files:write_file [INFO] 478:Writing: CA-SB1314-1624-Y2020.txt
Jun 17 19:22:05 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 02:22:04 extract_files:write_file [INFO] 478:Writing: CA-SB1315-1624-Y2020.txt
Jun 17 19:22:15 Code Engine legit-info-job-extractfiles-jobrun-gcjhm-0-0 06-18 02:22:06 extract_files:write_file [INFO] 478:Writing: CA-SB1316-1624-Y2020.txt
The extractjob is still running. I will check for the rest of the states and then run analyzejob after.
:wave: Hi! This issue has been marked stale due to inactivity. If no further activity occurs, it will automatically be closed.
The code extracts files for US and AZ. Then moves quickly from CA, GA, and MN without extracting anything. It then starts extracting OH.
Logs from Getdata job:
Logs from Extractdata job:
FYI @tonypearson @tnadams @demilolu