From 00add911b94e5556ae13b0019a22b3282363d148 Mon Sep 17 00:00:00 2001 From: David Blum Date: Wed, 6 Nov 2024 10:57:34 -0800 Subject: [PATCH] Run pre-commit --- README.md | 2 +- service/README.md | 2 +- service/ci/publish_to_github.sh | 4 ++-- service/web/server/src/lib/messaging.js | 4 ++-- service/worker/worker.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dde33d23d..3a4d7a6b9 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ BOPTEST can be deployed and used on your own computing resource by following the 2) Install [Docker](https://docs.docker.com/get-docker/). 3) Use Docker to build and run BOPTEST. In the root of this repository, run the following command. Note that if you want to be able to deploy multiple test cases at the same time, append the argument ``--scale worker=n`` where ``n`` equals the number of test cases you want to be able to have running at the same time. - + ``docker compose up web worker provision`` 4) In a separate process, use the API below to first select a test case to run, and then interact with it using your test controller. Send API requests to ``http://127.0.0.1:80/`` diff --git a/service/README.md b/service/README.md index d8648e398..ff04dac50 100644 --- a/service/README.md +++ b/service/README.md @@ -1,3 +1,3 @@ # BOPTEST-Service -This software implements BOPTEST as a web service architecture, which enables support for multiple clients and multiple simultaneous tests at a large scale. See the README.md at the root of the repositroy for more information. \ No newline at end of file +This software implements BOPTEST as a web service architecture, which enables support for multiple clients and multiple simultaneous tests at a large scale. See the README.md at the root of the repositroy for more information. diff --git a/service/ci/publish_to_github.sh b/service/ci/publish_to_github.sh index 9a9bea218..792db8ea9 100755 --- a/service/ci/publish_to_github.sh +++ b/service/ci/publish_to_github.sh @@ -1,4 +1,4 @@ -# load .env defines in root of repo +# load .env defines in root of repo export $(egrep -v '^#' .env | xargs) export GITHUB_WEB_REGISTRY_URI=ghcr.io/NREL/boptest-web export GITHUB_WORKER_REGISTRY_URI=ghcr.io/NREL/boptest-worker @@ -10,7 +10,7 @@ elif [[ "${GITHUB_REF}" =~ ^refs/tags/v[0-9].* ]]; then export VERSION_TAG="${GITHUB_REF/refs\/tags\//}" echo "The docker tag is set to: ${VERSION_TAG}" # use conditional below if you want to build a custom branch -# elif [[] "${GITHUB_REF}" == "refs/heads/boptest-service-custom" ]]; then +# elif [[] "${GITHUB_REF}" == "refs/heads/boptest-service-custom" ]]; then # export VERSION_TAG="experimental" fi diff --git a/service/web/server/src/lib/messaging.js b/service/web/server/src/lib/messaging.js index 0857b0e71..67150bad8 100644 --- a/service/web/server/src/lib/messaging.js +++ b/service/web/server/src/lib/messaging.js @@ -22,13 +22,13 @@ class Messaging { redis.subclient.on('message', (channel, message) => this.onMessage(channel, message)) } - // This function calls a remote worker method, and then waits for a reply. + // This function calls a remote worker method, and then waits for a reply. // // The following steps are involved. // 1. A message is published on the redis channel :request // signaling a request to the worker for data. The type of data is identified by `method`. // Any `params` necessary to compute the requested data are included in the message. - // 2. The worker listens for data requests on the redis request channel, `method` is mapped to a + // 2. The worker listens for data requests on the redis request channel, `method` is mapped to a // to a worker method, and the method is called with the given parameters. // 4. The worker publishes a message on the redis channel :response, // with the response data diff --git a/service/worker/worker.py b/service/worker/worker.py index 77057a3e8..53d8a1b8f 100644 --- a/service/worker/worker.py +++ b/service/worker/worker.py @@ -42,7 +42,7 @@ def __init__(self): self.logger = Logger().logger self.redis = redis.Redis(host=os.environ["BOPTEST_REDIS_HOST"]) self.logger.info("Worker initialized") - + def process_job(self, job): """ Process a single message from Queue.