Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardise global state in create_mets_v2
The `create_mets_v2` client script uses a bunch of global state for things like counters and file IDs. The original implementation could rely on these globals being reset between runs (by virtue of running the script in a new subprocess each time) but, after the batching changes, this is no longer the case. To make things more manageable, we pull all of this global stuff into a single top-level object which gets replaced at the beginning of each job run. Where other modules call the functions of create_mets_v2, they reset the global state as appropriate as well. A secondary piece of shared state is the `sharedVariablesAcrossModules` module, used by `create_mets_v2` and a handful of other scripts. Handling for this needed to be updated for the batching changes in a small number of places. Fixes archivematica/Issues#43 and archivematica/Issues#42
- Loading branch information