This repository contains a number of Sidekiq background jobs. The jobs are enqueued by workflow-server-rails.
The following workflows are supported by this repository:
Install libvips
and exiftool
, typically via brew
. These are pre-requisites for running the assemblyWF step that creates derivative JP2s.
The credentials for SideKiq Pro must be set on your laptop (e.g., in .bash_profile
): export BUNDLE_GEMS__CONTRIBSYS__COM=xxxx:xxxx
You can get this value from the servers, just SSH into one of the app servers and echo the value:
echo $BUNDLE_GEMS__CONTRIBSYS__COM
Install the gems
bundle install
It's possible to invoke the jobs manually or have an interactive shell:
From the root of the robot project:
Interactive console:
$ ROBOT_ENVIRONMENT=production ./bin/console
Running a single robot step manually (without checking current workflow status):
$ ./bin/run_robot --druid druid:12345 --environment production Accession::Publish
A simple "rake" should do everything you need, which will run both rubocop and rspec.
rake
or just rubocop
rubocop
or just the tests
rspec
During development, it can be useful to work with the objects available to the robots. You can most easily do this on a server with content, such as stage. This allows you to explore the data models and actions available.
cap stage ssh
ROBOT_ENVIRONMENT=production bin/console
druid='druid:qv402bt5465'
workflow_name='accessionWF'
process='end-accession'
object_client = Dor::Services::Client.object(druid)
cocina_object = object_client.find
workflow_service = LyberCore::WorkflowClientFactory.build(logger: nil)
workflow = LyberCore::Workflow.new(workflow_service:,druid:,workflow_name:,process:)
cocina_object.type
=> "https://cocina.sul.stanford.edu/models/book"
cocina_object.structural.contains.size
=> 17
workflow.status
=> "completed"
See Capfile
for deployment instructions