This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TODO: There is one problem with this approach | |
# We have no way to differentiate the cocina.json/public/mods files from purl from the files from stacks. | |
# It may be possible that one of the stacks files could have a name collision (e.g. if the name was "public") | |
require 'ocfl' | |
require 'druid-tools' | |
DRUIDS = %w[ | |
bd072pn1284 | |
] | |
OCFL_ROOT = '/stacks/ocfl-experiment-jcoyne' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TOKEN = ENV['GH_TOKEN'] | |
REPO = ENV['GH_REPO'] | |
ids = `curl -s \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token #{TOKEN}" \ | |
https://api.github.com/repos/#{REPO}/actions/caches | jq '.actions_caches[].id'` | |
ids.split.each do |id| | |
`curl -s \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tail -10000 dor_access_ssl.log | grep 'content ' | grep 200 | sed 's/.\+\(GET \/fedora\/objects\/druid.\+datastreams.\+\/content.\+\)HTTP\/1.1" 200 \([0-9]\+\).\+/\2 \1/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
description: Specification for Cocina Models | |
version: 1.0.0 | |
title: Cocina Models | |
license: | |
name: Apache 2.0 | |
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | |
paths: | |
/validate/Description: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
description: Specification for Cocina Models | |
version: 1.0.0 | |
title: Cocina Models | |
license: | |
name: Apache 2.0 | |
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | |
paths: | |
/validate/DescriptiveBasicValue: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filter = 'wf_wps_ssim:"accessionWF:sdr-ingest-transfer:error"' | |
search = Blacklight.default_index.search(fq: filter, fl: 'id', rows: 10_000) | |
druids = search.response['docs'].map {|d| d['id']} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
druids = Sidekiq::RetrySet.new do |job| | |
((klass, method, args) = YAML.load(job.args[0])) | |
end.map do |doc| | |
doc['error_message'].sub(%r{.*http://sul-lyberservices-prod.stanford.edu/workflow//objects/(druid:.{11})/.*}, '\1') | |
end | |
druids = ["druid:dv067yc0690", "druid:dt469gf3081", "druid:ky920wg4012", "druid:bk337cj4274", "druid:fr259mm2512", "druid:fv474yq5934", "druid:dq379sd3137", "druid:jv189bp0832", "druid:dv627hd0865", "druid:fv162qg9812", "druid:gz880xr9536", "druid:jz243nw3598", "druid:bz827kn6480", "druid:fp744tg4855", "druid:jg658nj5435", "druid:jk783gq9820", "druid:px855nm9126", "druid:ch376fv6873", "druid:bj513tx7008", "druid:mp546mj3927", "druid:bh956cq9786", "druid:df253qd2344", "druid:gt608br6686", "druid:bq013ky8003", "druid:ms951zt0048", "druid:fn279jk7616", "druid:fv217kn2691", "druid:fk707gf7514", "druid:cz014dj2495", "druid:cb475qw5208", "druid:hx396ky8951", "druid:cw372fd1981", "druid:hq532jr8640", "druid:jt102my9479", "druid:bx756rm7202", "druid:fr190hz8212", "druid:dx487gv0982", "drui |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
druids = Sidekiq::RetrySet.new do |job| | |
((klass, method, args) = YAML.load(job.args[0])) | |
end.map do |doc| | |
doc['error_message'].sub(%r{.*http://sul-lyberservices-prod.stanford.edu/workflow//objects/(druid:.{11})/.*}, '\1') | |
end | |
["druid:dv067yc0690", "druid:dt469gf3081", "druid:ky920wg4012", "druid:bk337cj4274", "druid:fr259mm2512", "druid:fv474yq5934", "druid:dq379sd3137", "druid:jv189bp0832", "druid:dv627hd0865", "druid:fv162qg9812", "druid:gz880xr9536", "druid:jz243nw3598", "druid:bz827kn6480", "druid:fp744tg4855", "druid:jg658nj5435", "druid:jk783gq9820", "druid:px855nm9126", "druid:ch376fv6873", "druid:bj513tx7008", "druid:mp546mj3927", "druid:bh956cq9786", "druid:df253qd2344", "druid:gt608br6686", "druid:bq013ky8003", "druid:ms951zt0048", "druid:fn279jk7616", "druid:fv217kn2691", "druid:fk707gf7514", "druid:cz014dj2495", "druid:cb475qw5208", "druid:hx396ky8951", "druid:cw372fd1981", "druid:hq532jr8640", "druid:jt102my9479", "druid:bx756rm7202", "druid:fr190hz8212", "druid:dx487gv0982", "druid:bh459tv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check(id) | |
result = Dor::Services::Client::AsyncResult.new(url: "https://dor-services-prod.stanford.edu/v1/background_job_results/#{id}") | |
return 'good' if result.complete? && result.errors.nil? | |
return 'not complete' if !result.complete? | |
result.errors | |
end | |
ids = ["18157", "18108"] | |
ids.each { |id| puts id if check(id) == 'good' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/views/schedule/index.html.erb:29-30 | |
<section class="day-body" | |
id="day-body-<%= schedule_day.day.by_example("2006-01-02") %>" | |
data-controller="toggle"> |
NewerOlder