Skip to content

Commit

Permalink
Add simple instiatiation test.
Browse files Browse the repository at this point in the history
  • Loading branch information
YooSunYoung committed May 27, 2024
1 parent a7434ea commit 675df35
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
python-version: ${{ inputs.python-version }}
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: python -m pip install -e .
- run: docker-compose version
- run: docker-compose -f tests/docker-compose-file-writer.yml up -d
- run: scicat_ingestor --verbose
- run: docker-compose -f tests/docker-compose-file-writer.yml down
4 changes: 1 addition & 3 deletions config.20240405.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"kafka": {
"topics": ["KAFKA_TOPIC_1","KAFKA_TOPIC_2"],
"group_id": "GROUP_ID",
"bootstrap_servers": [
"HOST:9092"
],
"bootstrap_servers": "file-writer-kafka:9093",
"enable_auto_commit": true,
"auto_offset_reset": "earliest"
},
Expand Down
4 changes: 2 additions & 2 deletions src/scicat_ingestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
from scicat_logging import build_logger


def quit(logger: logging.Logger) -> None:
def quit(logger: logging.Logger, unexpected: bool = True) -> None:
"""Log the message and exit the program."""
import sys

logger.info("Exiting ingestor")
sys.exit()
sys.exit(1 if unexpected else 0)


def main() -> None:
Expand Down

0 comments on commit 675df35

Please sign in to comment.