File tree Expand file tree Collapse file tree 6 files changed +92
-84
lines changed
classes/ColdTrick/OpenSearch Expand file tree Collapse file tree 6 files changed +92
-84
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ protected function command() {
3131 $ plugin = $ this ->getPlugin ();
3232
3333 if (!$ service ->isClientReady ()) {
34- $ this ->error (elgg_echo ('opensearch:cli:error:client ' ));
34+ $ this ->write (elgg_echo ('opensearch:cli:error:client ' ), ' error ' );
3535 return self ::FAILURE ;
3636 }
3737
@@ -45,7 +45,7 @@ protected function command() {
4545 }
4646
4747 if (!$ result ) {
48- $ this ->error (elgg_echo ("opensearch:cli:rebuild: {$ action }:error " ));
48+ $ this ->write (elgg_echo ("opensearch:cli:rebuild: {$ action }:error " ), ' error ' );
4949 return ;
5050 }
5151
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ protected function command() {
2727 $ service = IndexingService::instance ();
2828
2929 if (!$ service ->isClientReady ()) {
30- $ this ->error (elgg_echo ('opensearch:cli:error:client ' ));
30+ $ this ->write (elgg_echo ('opensearch:cli:error:client ' ), ' error ' );
3131 return self ::FAILURE ;
3232 }
3333
@@ -38,7 +38,7 @@ protected function command() {
3838 }
3939
4040 if (!$ result ) {
41- $ this ->error (elgg_echo ("opensearch:cli:sync: {$ action }:error " ));
41+ $ this ->write (elgg_echo ("opensearch:cli:sync: {$ action }:error " ), ' error ' );
4242 return ;
4343 }
4444
Original file line number Diff line number Diff line change 66use ColdTrick \OpenSearch \Di \SearchService ;
77use Elgg \Database \QueryBuilder ;
88use OpenSearch \Exception \OpenSearchExceptionInterface ;
9- use Psr \Log \LogLevel ;
109
1110/**
1211 * Cron handler
@@ -79,8 +78,8 @@ public static function dailyCleanup(\Elgg\Event $event): void {
7978 /* @var $logger \Elgg\Logger\Cron */
8079 $ logger = $ event ->getParam ('logger ' );
8180
82- // find documents in ES which don't exist in Elgg anymore
83- $ logger ->notice ('Starting OpenSearch cleanup: ES ' );
81+ // find documents in OpenSearch which don't exist in Elgg anymore
82+ $ logger ->notice ('Starting OpenSearch cleanup: OpenSearch ' );
8483
8584 self ::cleanupOpenSearch ();
8685
Original file line number Diff line number Diff line change @@ -26,19 +26,13 @@ abstract class BaseClientService {
2626
2727 private string $ search_alias ;
2828
29- protected Logger $ logger ;
30-
31- protected EventsService $ events ;
32-
3329 /**
3430 * Create the service
3531 *
3632 * @param Logger $logger Logger service
3733 * @param EventsService $events Events service
3834 */
39- public function __construct (Logger $ logger , EventsService $ events ) {
40- $ this ->logger = $ logger ;
41- $ this ->events = $ events ;
35+ public function __construct (protected Logger $ logger , protected EventsService $ events ) {
4236 }
4337
4438 /**
Original file line number Diff line number Diff line change 1616 "guzzlehttp/guzzle" : " ~7.9.0"
1717 },
1818 "conflict" : {
19- "elgg/elgg" : " <6.2 "
19+ "elgg/elgg" : " <6.3 "
2020 },
2121 "config" : {
2222 "allow-plugins" : {
2323 "php-http/discovery" : true
24- }
25- },
24+ },
25+ "platform" : {
26+ "php" : " 8.1"
27+ }
28+ },
2629 "extra" : {
2730 "discovery" : {
2831 "psr/http-factory-implementation" : " GuzzleHttp\\\\ Psr7\\\\ HttpFactory"
You can’t perform that action at this time.
0 commit comments