Skip to content

Embargo Release Processing

Naomi Dushay edited this page Jun 13, 2016 · 7 revisions

cron job checks for expired embargo dates

VM: sul-robots(n)-(prod|test) script: https://github.com/sul-dlss/common-accessioning/blob/master/robots/accession/embargo_release.rb

cron job: 16 2 * * * /bin/bash -l -c 'BUNDLE_GEMFILE=/home/lyberadmin/common-accessioning/current/Gemfile ROBOT_ENVIRONMENT=test /usr/local/rvm/wrappers/default/ruby /home/lyberadmin/common-accessioning/current/robots/accession/embargo_release.rb >> /home/lyberadmin/common-accessioning/current/log/crondebug.log 2>&1'

embargo_release.rb script updates:

  • Solr query
    • "embargo_status_ssim:\"embargoed\" AND embargo_release_dtsim:[* TO NOW]"
    • "twenty_pct_status_ssim:\"embargoed\" AND twenty_pct_visibility_release_dtsim:[* TO NOW]"
  • for each result

    load as Dor::Item

    opens new version

    calls item.release_embargo('application:accessionWF:embargo-release')

    calls item.close_version

Dor::Item.release_embargo

Dor::Item.close_version

Clone this wiki locally