Skip to content

Commit 350ec17

Browse files
committed
updates
1 parent 07d0195 commit 350ec17

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

backend/healthchecks/tests/test_views.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ def test_healthcheck_view(client, settings):
1212
response = client.get(reverse("healthcheck"))
1313
assert response.status_code == 200
1414
assert response.json() == {"status": "ok", "version": "testversion"}
15+
16+
17+
def test_healthcheck_raises_503_when_terminating(client, settings, mocker):
18+
mocker.patch("os.path.exists", return_value=True)
19+
20+
settings.GITHASH = "testversion"
21+
UserFactory()
22+
23+
response = client.get(reverse("healthcheck"))
24+
assert response.status_code == 503
25+
assert response.json() == {"status": "shutdown", "version": "testversion"}

infrastructure/applications/cluster/load_balancer_task.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ resource "aws_ecs_task_definition" "traefik" {
3636
{
3737
name = "TRAEFIK_PROVIDERS_ECS_REFRESHSECONDS",
3838
value = "15"
39-
},
40-
{
41-
name = "TRAEFIK_LOG_LEVEL"
42-
value = "DEBUG"
4339
}
4440
]
4541

infrastructure/applications/cluster/server.tf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ resource "aws_eip" "server" {
1212

1313
resource "aws_instance" "server" {
1414
ami = "ami-0d683ccb0045afce1"
15-
# instance_type = local.is_prod ? "t4g.large" : "t4g.small"
16-
instance_type = "t4g.large"
15+
instance_type = local.is_prod ? "t4g.large" : "t4g.small"
1716
subnet_id = data.aws_subnet.public_1a.id
1817
availability_zone = "eu-central-1a"
1918
vpc_security_group_ids = [

infrastructure/applications/pretix/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ resource "aws_ecs_task_definition" "pretix" {
3333
]
3434
timeout = 5
3535
interval = 10
36+
startPeriod = 120
3637
}
3738

3839
environment = [

0 commit comments

Comments
 (0)