Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Allow passing in number of cases to update. | ee680faa663867a52b2cbd49b68ba477f17c8cf0 | Luigi Bai | 2020-09-19 16:24:57 |
Give a heads up on how many cases will be udpated. | 6624a0e47f1a2f326e4f079a93dc8beea84aae24 | Luigi Bai | 2020-09-18 21:37:32 |
Choose only Active cases or cases with NULLs to update. | eadbf12cdc696dbe027578b2c352a09a2c6778b4 | Luigi Bai | 2020-09-18 21:37:13 |
Fix typo. | 021fde3ca5c6697ea1c7c9cee00d4c2937fb6385 | Luigi Bai | 2020-09-18 21:36:36 |
Fix dates to YYYY-MM-DD on the way in, as much as possible. | fa16c80ea14bad924f75ecc81d3cbfc4b2fe21e4 | Luigi Bai | 2020-09-18 21:36:20 |
Include some SQL scripts to update dates from the courts to YYYY-MM-DD. | bde2825badffc0900955df5119107f38121eb14a | Luigi Bai | 2020-09-18 21:35:23 |
* improve date manipulation, replace moment with dayjs * (bug) Court.class extract parser now creates correct Docket and DocketedCase * don't bother with EXTRACT_HEARINGS, those are always empty * updateStatus updates status AND filed_Date | 8ae2890852f5cb53c0429cc791098fee86f5b793 | Luigi Bai | 2020-09-18 02:49:03 |
Store case status and filedDate when available | e0d7a3d44e4560e04133e777bdc0697bec57a8d4 | Luigi Bai | 2020-09-16 20:38:15 |
Clean up data xfer. Use TRUNCATE TABLE instead of DELETE FROM. | e407788ccd1fb9ace1ca7cad4b0a1acd0189c799 | Luigi Bai | 2020-09-16 02:37:15 |
Clean up code. | 3036e8ca177024179b3a6e391876121e526cd213 | Luigi Bai | 2020-09-16 02:36:42 |
Add bulkExtract importer. | 0da4130e3e3a3e2e855f2ef28c4194fb6b5dfe10 | Luigi Bai | 2020-09-16 02:36:02 |
Add court related data | 20f13f9ef9885794eddb2470bd57a9207dc7af20 | Luigi Bai | 2020-09-12 21:47:34 |
Try to avoid errors where information may be missing. | 3410e49ba53bd7ebb417ee9bac7db1cf9e0e8808 | Luigi Bai | 2020-09-09 17:08:59 |
Don't put status information into console.log. | 19dab8ff60a0256f9511391d4088c1b8f88ac3db | Luigi Bai | 2020-09-09 17:06:24 |
Add more info to README. | 9708b396b887bab284e0ad2c2d996ea2db0ff4d4 | Luigi Bai | 2020-09-09 12:37:24 |
Add info to README. | 79672fad423a570d7eb05c4891dfabb511db5ab3 | Luigi Bai | 2020-09-09 00:20:23 |
Fixed searchNames. Now you can load cases where you know one of the parties. | 0ad812704e27341a481a6de18c88a4f38bb61700 | Luigi Bai | 2020-09-08 23:43:48 |
Apparently updating addresses works, as long as you don't ask for more than 10 per minute. That seems to be working so far. | 9276b2acb2cc3067c53fc16317a8960db3f6fcca | Luigi Bai | 2020-09-08 22:44:24 |
More information about how to use the software. Not much, yet. Enough to get started, I think. | 393fce58bbcfeaee947cb2b0e17d81d16da49612 | Luigi Bai | 2020-09-08 22:31:02 |
Don't write to console.err if there's a rejectionFunction. | 630b8ec76a21733a6bb93d98ca54563aadd61da4 | Luigi Bai | 2020-09-08 22:30:29 |
File | Lines added | Lines deleted |
---|---|---|
updateAddress.js | 8 | 1 |
File updateAddress.js changed (mode: 100644) (index 8e0bfad..9584171) | |||
... | ... | const DAO = require("./lib/sqlDAO"); | |
20 | 20 | const Case = require("./lib/Case.class"); | const Case = require("./lib/Case.class"); |
21 | 21 | const OdysseyInfo = require("./lib/OdysseyInfo.class"); | const OdysseyInfo = require("./lib/OdysseyInfo.class"); |
22 | 22 | ||
23 | let rowLimit = 25; | ||
24 | if (process.argv.length > 2) { | ||
25 | let n = Number(process.argv[2]); | ||
26 | if (!Number.isNaN(n) && n.valueOf() > 0) rowLimit = n.valueOf(); | ||
27 | } | ||
28 | |||
23 | 29 | let opts = require("./creds")["SQLITE3"]; | let opts = require("./creds")["SQLITE3"]; |
24 | 30 | opts.connectCallback = database => { | opts.connectCallback = database => { |
25 | 31 | // Prep the databse to update each case as we get its updated info: | // Prep the databse to update each case as we get its updated info: |
... | ... | opts.connectCallback = database => { | |
38 | 44 | // Track all the update promises, then wait until they're done: | // Track all the update promises, then wait until they're done: |
39 | 45 | let promises = []; | let promises = []; |
40 | 46 | database.each( | database.each( |
41 | "SELECT casenumber as caseNumber FROM cases WHERE casenumber IS NOT NULL AND odyssey_ID IS NULL ORDER BY casenumber DESC LIMIT 10", | ||
47 | "SELECT casenumber as caseNumber FROM cases WHERE casenumber IS NOT NULL AND odyssey_ID IS NULL ORDER BY casenumber DESC LIMIT "+rowLimit, | ||
42 | 48 | // This is the callback used for each case: | // This is the callback used for each case: |
43 | 49 | (err, caseObj) => { | (err, caseObj) => { |
44 | 50 | if (! caseObj.caseNumber) console.error("Database had case with no casenuber."); | if (! caseObj.caseNumber) console.error("Database had case with no casenuber."); |
... | ... | opts.connectCallback = database => { | |
72 | 78 | } | } |
73 | 79 | }, | }, |
74 | 80 | () => { | () => { |
81 | console.log("Updating", promises.length, "addresses."); | ||
75 | 82 | // And this is the callback used when the SELECT is finished: | // And this is the callback used when the SELECT is finished: |
76 | 83 | Promise.all(promises) | Promise.all(promises) |
77 | 84 | .finally(() => { | .finally(() => { |