At startup, get the `name` (e.g. amz) openlibrary.core.imports.Batch() for global use.
(name: str)
| 329 | |
| 330 | |
| 331 | def get_current_batch(name: str) -> Batch: |
| 332 | """ |
| 333 | At startup, get the `name` (e.g. amz) openlibrary.core.imports.Batch() for global use. |
| 334 | """ |
| 335 | global batch |
| 336 | if not batch: |
| 337 | batch = Batch.find(name) or Batch.new(name) |
| 338 | assert batch |
| 339 | return batch |
| 340 | |
| 341 | |
| 342 | def get_isbns_from_book(book: dict) -> list[str]: # Singular: book |
no test coverage detected