Skip to content

Commit

Permalink
fix(Alert): Ship Name can be None
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Sep 24, 2023
1 parent fcdd6df commit f27a29f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION ?= 1.0.0

BLOOM_DEV_DOCKER = @docker run --name bloom-test --mount type=bind,source="$(shell pwd)",target=/source_code --env-file ./.env.test --network=bloom_net
BLOOM_PRODUCTION_DOCKER = @docker run --mount type=bind,source="$(shell pwd)",target=/source_code --env-file ./.env --log-driver json-file --log-opt max-size=1g --log-opt max-file=3 --entrypoint /entrypoint.sh
BLOOM_PRODUCTION_DOCKER = @docker run --mount type=bind,source="$(shell pwd)",target=/source_code --env-file ./.env --log-driver json-file --log-opt max-size=10M --log-opt max-file=3 --entrypoint /entrypoint.sh

build:
@docker build -t d4g/bloom:${VERSION} --platform linux/amd64 -f docker-env/Dockerfile .
Expand Down
2 changes: 1 addition & 1 deletion bloom/domain/alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class Alert(BaseModel):
ship_name: str
ship_name: str | None
mmsi: int
last_position_time: datetime
position: str
Expand Down
2 changes: 1 addition & 1 deletion bloom/usecase/GenerateAlerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def send_slack_alert(
{
"type": "mrkdwn",
"text": "*Name of the vessel:*\\n"""
+ alert.ship_name
+ (alert.ship_name or "None")
+ """"
},
{
Expand Down

0 comments on commit f27a29f

Please sign in to comment.