sul-dlss-deprecated / sdr-preservation-core

Robots for ingesting objects into SDR Preservation Core -- replaced by preservation_robots
Other
1 stars 0 forks source link

Bypass bash script calling bundle - just call it directly #28

Closed dazza-codes closed 7 years ago

dazza-codes commented 7 years ago

Fixes sul-dlss/operations-tasks#334

dazza-codes commented 7 years ago

Not sure how to test this and why Richard was motivated to create the bin/bundle-exec.sh script in the first place. Seems to have something to do with changing to the bin path, depending on where the bin utility might be called from.

(Ideally, some of these things might be rake tasks. But that's not the point of this PR right now.)

dazza-codes commented 7 years ago

This fix might also need to be applied to other files in the bin directory? e.g.

$ ack-grep 'bundle-exec.sh' bin/
bin/druid_queue.rb
12:    Syntax: bundle-exec.sh druid_queue.rb {#{WorkflowNames.join('|')}}

bin/status_storage.rb
13:    Syntax: bundle-exec.sh status_storage.rb [threshold (default=100GB)]

bin/daily-status.sh
24:objects=`./bundle-exec.sh status_workflow.rb sdrIngestWF archived | cut -f3 -d' '`
25:terabytes=`./bundle-exec.sh status_storage.rb terabytes | cut -f3 -d' '`

bin/status_activity.rb
23:    Syntax: bundle-exec.sh status_activity.rb {#{WorkflowNames.join('|')}} {history|errors|realtime}

bin/purge_object.rb
7:# echo xg086nq7357 | ~/sdr-preservation-core/current/bin/bundle-exec.sh purge_object.rb
8:# ~/sdr-preservation-core/current/bin/bundle-exec.sh purge_object.rb  myfile.txt

bin/status_workflow.rb
21:    Syntax: bundle-exec.sh status_workflow.rb {#{WorkflowNames.join('|')}} {detail|summary|waiting}

bin/bundle-exec.sh
3:# bundle-exec.sh

bin/menu.rb
16:    Syntax: bundle-exec.sh menu.rb  {#{WorkflowNames.join('|')}}

bin/status_monitor.rb
15:    Syntax: bundle-exec.sh status_monitor.rb  {#{WorkflowNames.join('|')}} {report|queue}

bin/robot_runner.rb
22:    Syntax: bundle-exec.sh robot_runner.rb  {#{WorkflowNames.join('|')}} ['debug'] ['verify']

bin/cron_jobs.txt
6:#*/30 * * * *  /bin/bash -l -c "${HOME}/sdr2/current/bin/bundle-exec.sh status_process.rb sdrIngestWF start! cron"
12:#*/2 * * * *  /bin/bash -l -c "${HOME}/sdr2/current/bin/bundle-exec.sh status_monitor.rb sdrIngestWF queue cron"

bin/status_process.rb
11:    Syntax: bundle-exec.sh status_process.rb {#{WorkflowNames.join('|')}}