Skip to content

Commit c7c264b

Browse files
author
extreme4all
committed
fix naming
1 parent 6083a72 commit c7c264b

File tree

10 files changed

+44
-43
lines changed

10 files changed

+44
-43
lines changed

.github/workflows/hiscore_worker.yml renamed to .github/workflows/worker_hiscore.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
name: hiscore_worker
1+
name: worker_hiscore
22

33
on:
44
push:
55
paths:
6-
- bases/bot_detector/hiscore_worker/**
6+
- bases/bot_detector/worker_hiscore/**
77
- components/bot_detector/database/**
88
- components/bot_detector/kafka/**
99
- components/bot_detector/structs/**
1010
- components/bot_detector/logfmt/**
11-
- projects/hiscore_worker/**
11+
- projects/worker_hiscore/**
1212
workflow_dispatch:
1313
inputs:
1414
environment:
@@ -24,7 +24,7 @@ jobs:
2424
common:
2525
uses: ./.github/workflows/_common.yml
2626
with:
27-
project_dir: projects/hiscore_worker
27+
project_dir: projects/worker_hiscore
2828

2929
build:
3030
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'deploy to prd' }}
@@ -34,7 +34,7 @@ jobs:
3434
registry: quay.io/bot_detector/highscore-worker
3535
environment: ${{ (github.event.inputs.environment == 'deploy to prd' && 'prd') }}
3636
BUILD_ARGS: "--target=production"
37-
DOCKERFILE: ./projects/hiscore_worker/Dockerfile
37+
DOCKERFILE: ./projects/worker_hiscore/Dockerfile
3838
secrets:
3939
QUAY_REGISTERY_PASSWORD: ${{ secrets.QUAY_REGISTERY_PASSWORD }}
4040

_kafka/src/kafka_topics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def create_topics(kafka_broker: str | list):
2222
),
2323
# producer: hiscore_scraper
2424
# producer: runemetrics_scraper
25-
# consumer: hiscore_worker
25+
# consumer: worker_hiscore
2626
NewTopic(
2727
name="players.scraped",
2828
num_partitions=4,

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ services:
125125
depends_on:
126126
kafka_setup:
127127
condition: service_completed_successfully
128-
hiscore_worker:
129-
container_name: hiscore_worker
130-
image: bd/hiscore_worker # tags the image if build
128+
worker_hiscore:
129+
container_name: worker_hiscore
130+
image: bd/worker_hiscore # tags the image if build
131131
build:
132132
context: ./
133-
dockerfile: ./projects/hiscore_worker/Dockerfile
133+
dockerfile: ./projects/worker_hiscore/Dockerfile
134134
target: production
135135
# command: ["sleep", "infinity"]
136136
networks:

projects/hiscore_worker/Dockerfile renamed to projects/worker_hiscore/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ COPY ./bases ./bases
1111
COPY ./components ./components
1212
COPY ./projects ./projects
1313

14-
WORKDIR /app/projects/hiscore_worker
14+
WORKDIR /app/projects/worker_hiscore
1515

1616
# RUN uv build
1717
RUN uv sync --frozen --no-editable
@@ -21,10 +21,10 @@ FROM python:3.11-slim-bookworm AS production
2121

2222
RUN adduser -u 5678 --disabled-password --gecos "" appuser
2323

24-
WORKDIR /app/projects/hiscore_worker
24+
WORKDIR /app/projects/worker_hiscore
2525

26-
COPY --from=builder --chown=appuser /app/projects/hiscore_worker/.venv /app/projects/hiscore_worker/.venv
26+
COPY --from=builder --chown=appuser /app/projects/worker_hiscore/.venv /app/projects/worker_hiscore/.venv
2727

2828
USER appuser
2929

30-
CMD [".venv/bin/hiscore_worker"]
30+
CMD [".venv/bin/worker_hiscore"]

projects/hiscore_worker/pyproject.toml renamed to projects/worker_hiscore/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["hatchling", "hatch-polylith-bricks"]
33
build-backend = "hatchling.build"
44

55
[project]
6-
name = "hiscore_worker"
6+
name = "worker_hiscore"
77
version = "0.1.0"
88
requires-python = ">=3.10"
99

@@ -18,7 +18,7 @@ dependencies = [
1818
]
1919

2020
[project.scripts]
21-
hiscore_worker = "bot_detector.hiscore_worker.core:run"
21+
worker_hiscore = "bot_detector.worker_hiscore.core:run"
2222

2323
# This section is needed for building
2424
[tool.hatch.build.targets.wheel]
@@ -27,7 +27,7 @@ packages = ["bot_detector"]
2727
[tool.hatch.build.hooks.polylith-bricks]
2828

2929
[tool.polylith.bricks]
30-
"../../bases/bot_detector/hiscore_worker" = "bot_detector/hiscore_worker"
30+
"../../bases/bot_detector/worker_hiscore" = "bot_detector/worker_hiscore"
3131
"../../components/bot_detector/database" = "bot_detector/database"
3232
"../../components/bot_detector/kafka" = "bot_detector/kafka"
3333
"../../components/bot_detector/structs" = "bot_detector/structs"

projects/hiscore_worker/uv.lock renamed to projects/worker_hiscore/uv.lock

Lines changed: 26 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/bases/bot_detector/hiscore_worker/test_core.py renamed to test/bases/bot_detector/worker_hiscore/test_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from bot_detector.hiscore_worker import core
1+
from bot_detector.worker_hiscore import core
22

33

44
def test_sample():

0 commit comments

Comments
 (0)