Skip to content

Commit

Permalink
Add context and job command to cookbook entry
Browse files Browse the repository at this point in the history
  • Loading branch information
kspurgin committed Dec 7, 2023
1 parent 73de899 commit 0f4d826
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions doc/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,15 +506,21 @@ end
### Dynamically register the jobs

~~~
%w[concept era event organization people person place].each do |authority|
register authority.to_sym, {
creator: {
callee: Project::Jobs::SubjectProper::Split,
args: {authority: authority}
},
path: File.join(Project.datadir, "working",
"subject_proper_#{authority}.csv"),
tags: [:subject_proper, "#{authority}s".to_sym]
}
Project.registry.namespace("subject_proper") do
...
%w[concept era event organization people person place].each do |authority|
register authority.to_sym, {
creator: {
callee: Project::Jobs::SubjectProper::Split,
args: {authority: authority}
},
path: File.join(Project.datadir, "working",
"subject_proper_#{authority}.csv"),
tags: [:subject_proper, :split, "#{authority}s".to_sym]
}
end
end
~~~

Now you can run the split jobs: `thor jobs tagged_and --tags subject_proper split`

0 comments on commit 0f4d826

Please sign in to comment.