From 0f4d82618b028fd9fb5373432f0b0b10dde51c92 Mon Sep 17 00:00:00 2001 From: Kristina Spurgin Date: Thu, 7 Dec 2023 12:02:07 -0500 Subject: [PATCH] Add context and job command to cookbook entry --- doc/cookbook.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/doc/cookbook.md b/doc/cookbook.md index 0dd462b1..c284aa33 100644 --- a/doc/cookbook.md +++ b/doc/cookbook.md @@ -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`