Releases: zepgram/module-multi-threading
[v0.1.6] Cronjob context and parent resource availability
Overview
This release addresses an issue related to resource connections being incorrectly terminated by child processes, which previously led to unavailable resources for the parent process. The update ensures a more reliable operation of the module, especially when used in scheduled tasks. This would unlikely occurred on a command line execution, unless your parent pid was using resource after completed children processes.
Key Changes
- Improved Resource Connection Management in Child Processes:
- The update resolves a crucial issue where MySQL connections were inadvertently closed by child processes, rendering them unavailable for the parent process.
- This fix is particularly beneficial in scenarios where the module is utilized within cron jobs, ensuring subsequent tasks in the cron schedule are not impacted by unavailable database connections.
-
Enhanced Process Management and Stability:
The module now employs register_shutdown_function() in child processes to forcefully terminate them using posix_kill(getmypid(), SIGKILL) upon completion of their tasks. This ensures a clean and immediate release of resources, preventing potential resource leaks or locking issues. -
Posix dependency
The module now requiresext-posix
as dependency in order to run.
[v0.1.5] fix when fetched result are empty
In case we had no results from criteria/collection: the script was simply running indefinitly.
Now if there is no result, the script will stop execution on first iteration.
[v0.1.4] fix public access on sig method
[v0.1.4] handle sigint and sigterm, change method to public
Release 0.1.3
[0.1.3] release
- fix psr-4 naming convention for https://github.com/zepgram/module-multi-threading/blob/main/Model/Dimension/ParallelWebsiteProcessor.php
Release 0.1.2
[0.1.2] release
- add store and website dimensions to allow implementation of parallel processes foreach stores, this is not possible with the getList method which is not compliant with service contract (there is no search criteria parameter, so we cannot use the ForkedSearchResultProcessor).
- update documentation accordingly.
Release 0.1.1
[0.1.1] release
- add fallback system for children failure: missing pages are now handled and processed by parent process.
- add log "Fallback on missing pages" containing pages missing from collection
Release 0.1.0
[0.1.0] release
- remove isParallelize parameter in processors, it can be determined by maxChildrenProcess === 1
- handle notion of idempotent/non-idempotent query, if a query is not idempotent, then it can be handled by a fallback system based on the initial collection query whose result is modified dynamically by each child iteration.
- fallback system may not be required on idempotent query, as each child as his dedicated page to execute because the query result will not change on each iteration.
- handle idempotent parameter to true if there is only one child to run processes, pagination will be correct until the end.