From 5100d453fc2749722555ac000b23b482ffd9ad37 Mon Sep 17 00:00:00 2001 From: Scott Aubrey Date: Wed, 9 Oct 2024 07:07:00 +0100 Subject: [PATCH] remove remaining mentions of gearman and workers (#526) --- bin/ci-process-bootstrap | 7 ------- bin/wait-for-empty-queues | 8 +++----- docker-compose.yaml | 1 - .../Api/Elasticsearch/Command/BuildIndexCommand.php | 2 +- tests/bootstrap | 11 ----------- 5 files changed, 4 insertions(+), 25 deletions(-) diff --git a/bin/ci-process-bootstrap b/bin/ci-process-bootstrap index 797b8365..bddde41a 100644 --- a/bin/ci-process-bootstrap +++ b/bin/ci-process-bootstrap @@ -4,13 +4,6 @@ interrupt_fn() { set +e echo "Performing cleanup..." - if [ -n "$workerPid" ]; then - if ps -p "$workerPid" > /dev/null; then - echo "Worker is still running. Terminating..." - kill "$workerPid" - fi - fi - if [ -n "$queueWatchPid" ]; then if ps -p "$queueWatchPid" > /dev/null; then echo "Watcher is still running. Terminating..." diff --git a/bin/wait-for-empty-queues b/bin/wait-for-empty-queues index a9ad1282..e86aa4ae 100755 --- a/bin/wait-for-empty-queues +++ b/bin/wait-for-empty-queues @@ -1,11 +1,9 @@ #!/usr/bin/env bash set -e -# with just a single worker the polling may fail often as there is a gap between accepting and completing a job. -# with more workers this becomes less unlikely. -# more workers also means more CPU usage which means less CPU available for serving traffic. - -# same again, but for the sqs watcher +# with just a single sqs watcher the polling may fail often as there is a gap between accepting and completing a job. +# with more sqs watchers this becomes less unlikely. +# more sqs watchers also means more CPU usage which means less CPU available for serving traffic. num_watches_threshold=100 # 100 attempts with a .10s interval is 10 seconds num_watches_attempt=0 diff --git a/docker-compose.yaml b/docker-compose.yaml index f70a7a32..4ea90f3a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -72,7 +72,6 @@ services: dockerfile: Dockerfile target: dev environment: - - GEARMAN_HOST=gearman - GATEWAY_HOST=api-dummy:8080 volumes: - ./:/app diff --git a/src/Search/Api/Elasticsearch/Command/BuildIndexCommand.php b/src/Search/Api/Elasticsearch/Command/BuildIndexCommand.php index 71d73f05..f8bd3a77 100644 --- a/src/Search/Api/Elasticsearch/Command/BuildIndexCommand.php +++ b/src/Search/Api/Elasticsearch/Command/BuildIndexCommand.php @@ -31,7 +31,7 @@ protected function configure() ->setDescription('Ensure Elasticsearch has been setup WARNING: DROPS CONTENT WITH -d') ->addOption('delete', 'd', InputOption::VALUE_NONE, 'Drop content') ->addOption('index', 'i', InputOption::VALUE_OPTIONAL, 'Index that should be (re)created') - ->setHelp('Creates new Gearman client and imports entities from API'); + ->setHelp('Ensures Elasticsearch has been setup'); } protected function execute(InputInterface $input, OutputInterface $output) diff --git a/tests/bootstrap b/tests/bootstrap index e7370e95..a182ba8f 100644 --- a/tests/bootstrap +++ b/tests/bootstrap @@ -4,14 +4,3 @@ * * This contains SHIMs for certain classes. */ - -// @todo fix autoloading -namespace { - if (!class_exists('GearmanClient')) { - class GearmanClient - { - } - - define('GEARMAN_SUCCESS', 'GEARMAN_SUCCESS'); - } -}