-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Michael J. Giarlo edited this page Dec 2, 2020
·
10 revisions
Welcome to the happy-heron ("H2") wiki! This is where we put developer-focused documentation.
...
Completing a deposit of a work or a collection in H2 requires SDR integration, which we don't have when doing development locally. (We could add sdr-api in docker-compose.yml, but then we need dor-services-app, workflow-service, fedora, etc. etc., so it would very quickly become heavier than we want.) It's still useful to simulate completion of deposits. Here's how to do that:
# Make sure to have the object ID (the database ID, an integer), e.g.:
id = 123
# Make up a druid too, e.g.:
druid = 'druid:bc123df4567'
# This simulates what's done in the DepositStatusJob when we receive a response from sdr-api
object = Work.find(id) # or Collection.find(id)
object.update(druid: druid)
object.add_purl_to_citation if object.respond_to?(:add_purl_to_citation)
object.deposit_complete!
You may wish to check the latest definition of DepositStatusJob#complete_deposit
to confirm this documentation hasn't gotten stale. If it has, please update it.
...