searchwp\background_process\load_throttle
Seit: 4.1.4
Wenn die Lastüberwachung von SearchWP erkennt, dass der CPU-Lastschwellenwert überschritten wurde, wird ein Timeout in den Indexierungsprozess eingefügt. Sie können diesen Hook verwenden, um die Dauer dieses Timeouts anzupassen.
Parameter
| Typ | Parameter | Standard | Seit | ||||||
|---|---|---|---|---|---|---|---|---|---|
| Ganzzahl | $throttle |
2 * aktuelle CPU-Auslastung | 4.1.4 |
||||||
| Array |
$args
|
4.1.4 |
|||||||
Beispiele
All hooks should be added to your custom SearchWP Customizations Plugin.
Verwende eine Auslastung, die 4-mal so hoch ist wie die aktuelle CPU-Auslastung
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Customize SearchWP's Indexer throttle. | |
| add_filter( 'searchwp\background_process\load_throttle', function( $throttle, $args ) { | |
| return 4 * $args['load']; | |
| }, 10, 2 ); |

