crkn-rcdr / cihm-metadatabus

Documentation and Docker build environment for key portions of the metadata bus.
BSD 2-Clause "Simplified" License
0 stars 1 forks source link

Merge functionality of Press2 into Hammer2 #56

Closed RussellMcOrmond closed 2 years ago

RussellMcOrmond commented 2 years ago

Discussed in more detail in #23

RussellMcOrmond commented 2 years ago

For testing I am pointing to production databases for input, local databases for output.

russell@russell-XPS-13-7390:~/git/cihm-metadatabus$ grep -iE "COUCHDB_(access|canvas|cosearch|copresentation)" .env.secret | grep -v ^#
COUCHDB_ACCESS=http://jarlsberg.tor.c7a.ca:5984/access
COUCHDB_CANVAS=http://jarlsberg.tor.c7a.ca:5984/canvas
COUCHDB_COPRESENTATION2=http://couchdb:5984/copresentation2
COUCHDB_COSEARCH2=http://couchdb:5984/cosearch2
russell@russell-XPS-13-7390:~/git/cihm-metadatabus$ 

Hammer2 allows which slug to process as a command-line option, bypassing regular hammerQueue. Always use this for testing, so the local work doesn't impact production data. Don't run without the --slug, or it will remove entries from hammerQueue which the production Hammer2 needs to process.

tdr@f3c97e6b332f:~$ hammer2 --slug=oocihm.N_00083_18980720

RussellMcOrmond commented 2 years ago

Forgot to double-check that the local variables were set. Accidentally modified production database.

tdr@ee3f219d07dd:~$ set | grep -iE "COUCHDB_(access|canvas|cosearch|copresentation)"
COUCHDB_ACCESS=http://jarlsberg.tor.c7a.ca:5984/access
COUCHDB_CANVAS=http://jarlsberg.tor.c7a.ca:5984/canvas
COUCHDB_COPRESENTATION2=http://couchdb:5984/copresentation2
COUCHDB_COSEARCH2=http://couchdb:5984/cosearch2
tdr@ee3f219d07dd:~$ 
RussellMcOrmond commented 2 years ago

I copied the access database to the local CouchDB, and will be doing additional testing this way. I will not be modifying the canvas database, so will keep it pointing to the production server.

russell@russell-XPS-13-7390:~/git/cihm-metadatabus$ curl -X POST http://localhost:5984/access/_design/access/_update/forceUpdate/69429/m06m3319xg0b
{"message":"Hammer update forced for oocihm.8_01883_1"}
russell@russell-XPS-13-7390:~/git/cihm-metadatabus$ 
tdr@3c25d11d2fa9:~$ set | grep -iE "COUCHDB_(access|canvas|cosearch|copresentation)"
COUCHDB_ACCESS=http://couchdb:5984/access
COUCHDB_CANVAS=http://jarlsberg.tor.c7a.ca:5984/canvas
COUCHDB_COPRESENTATION2=http://couchdb:5984/copresentation2
COUCHDB_COSEARCH2=http://couchdb:5984/cosearch2
tdr@3c25d11d2fa9:~$ hammer2
tdr@3c25d11d2fa9:~$