Skip to content

Define corpus_id attribute in dev mode

The recent work on corpus_id in https://gitlab.com/teklia/workers/base-worker/-/issues/141 left corpus_id undefined when running the worker locally. This can be solved by loading it from either config or from environment during configure_for_developers.

This is now needed when using the helpers list_corpus_entities, check_required_types, get_ml_class_id, create_entity and some others in dev mode (locally).

There would now be

  • the good way, export ARKINDEX_CORPUS_ID=<uuid>
  • the hacky way, self.corpus_id = <uuid> # in configure
Edited by Yoann Schneider