[Bug] - Importing California (district `USA-5`) cannot be finished due to many commands in the transaction
During the process_district()
-function run, an exception is raised because the maximum number of 2^32-2 commands per transaction is exceeded. Apparently each asset insertion qualifies as a command and so California cannot be handled in one transaction. The solution must include multiple commits to ensure that the maximum number of commands is not reached. Unfortunately, frequent commits during the processing cannot be simply introduced because the district processing may fail in the multiprocessing when overlapping districts are processed simultaneously. In this case, the failing district process is aborted and put back into the processing queue. Should in the meantime district data been committed, this would need to be cleaned up before processing the district again.