Releases: zepgram/module-multi-threading
0.3.0
Fixed
- thread:processor exit status masking: command now returns failure when at least one wrapped iteration fails.
- thread:processor argument passthrough: command now supports command arguments (including whitespace command strings like
"help cache:clean"). - thread:processor memory pressure on output-heavy commands: output is now flushed incrementally while child process is running instead of only at process end.
- invalid max children configuration:
ForkedProcessorRunner,ParallelStoreProcessor, andParallelWebsiteProcessornow rejectmaxChildrenProcess <= 0. - dimension processors with empty inputs: store/website processors now return early without running the forked runner when no targets exist.
Added
thread:processor --fail-on-loopoption to break iteration loop after first failure.thread:processor --ignore-exit-codeoption to force success exit code while emitting a warning summary.thread:processor command_argsarray argument.
Changed
ForkedProcessorfallback now targets explicitly failed pages instead of all non-completed pages.ForkedProcessorsupports configurable child DB reconnect behavior through constructor argumentreconnectDatabaseInChild(now opt-in; defaultfalseto preserve DB session compatibility for temporary-table-based workloads).ForkedProcessorcompatibility mode (default) now terminates child workers with signals to avoid PHP child shutdown closing parent DB session state used by temporary-table-based workloads.
Release 0.1.9
[v0.1.9] correctly handle kill signal for command line processor
v0.1.8
v0.1.7
[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-posixas 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