Skip to content

Commit

Permalink
Add Elasticsearch health check
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahmon committed Feb 15, 2021
1 parent aedea57 commit 7cec74d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions elasticpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function( $class ) {

require_once __DIR__ . '/includes/compat.php';
require_once __DIR__ . '/includes/utils.php';
require_once __DIR__ . '/includes/health-check.php';

// Define a constant if we're network activated to allow plugin to respond accordingly.
$network_activated = Utils\is_network_activated( EP_FILE );
Expand Down
21 changes: 21 additions & 0 deletions includes/health-check.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Health check
*
* @package elasticpress
* @since 3.6.0
*/

namespace ElasticPress;

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}

$health_checks = [
new HealthCheck\HealthCheckElasticsearch(),
];

foreach ( $health_checks as $health_check ) {
$health_check->register_test();
}

0 comments on commit 7cec74d

Please sign in to comment.