- Issue created by @charginghawk
- Merge request !15Issue #3525405: Use batch processing for translating job items. β (Closed) created by charginghawk
- Merge request !16Resolve #3525405 "Move sendjobitem then use batch processing" β (Open) created by charginghawk
- πΊπΈUnited States charginghawk
Rerolled a new MR after the 8.x-1.24 release, which rewrote the same code. This time I broke the MR into two commits for readability. The first simply moves stuff inside loop "foreach ($job_items as $job_item) {}" into its own method:
https://git.drupalcode.org/project/tmgmt_memsource/-/merge_requests/16/d...
The second then implements the actual batch processing:
https://git.drupalcode.org/project/tmgmt_memsource/-/merge_requests/16/d...
This should make it easier to reroll if the send job item logic gets updated, just move it all to its own method again and then implement the batch processing the same.
There's a problem with MemsourceTranslator::getMemsourceProjectIdByContent(), it also has a job item foreach loop that then runs some queries for each job item. This has the same timeout issue, but you can avoid it via job options, so I added a notice to users and some todos to improve it. It shouldn't be too hard to consolidate the queries so that we get the project IDs in one query.