Skip to content

Commit

Permalink
Hardcoding initial chunk_time_interval to 1 day.
Browse files Browse the repository at this point in the history
  • Loading branch information
freol35241 committed Aug 18, 2023
1 parent 1ba9e79 commit 375398d
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CREATE TABLE vessel_data.master (
CONSTRAINT no_duplicates_key UNIQUE(time, vessel_id, parameter_id)
);

SELECT create_hypertable('vessel_data.master', 'time');
SELECT create_hypertable('vessel_data.master', 'time', chunk_time_interval => INTERVAL '1 day');

CREATE INDEX ON vessel_data.master (vessel_id, time DESC);
CREATE INDEX ON vessel_data.master (parameter_id, time DESC);
Expand Down
1 change: 0 additions & 1 deletion docker-compose.base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ services:
POSTGRES_DB: pontos
POSTGRES_USER: pontos_user
POSTGRES_PASSWORD: ${PONTOS_DB_PASSWORD}
TIMESCALEDB_CHUNK_TIME_INTERVAL: ${PONTOS_DB_INITIAL_CHUNK_TIME_INTERVAL:-'24 hours'}
volumes:
# Data volume
- vol-pg-data:/var/lib/postgresql/data
Expand Down
2 changes: 0 additions & 2 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ PONTOS_EMQX_DASHBOARD_PORT=8081 # default: 8081
PONTOS_TRAEFIK_LOG_LEVEL=ERROR # default: ERROR
PONTOS_EMQX_LOG_LEVEL=warning # default: warning

PONTOS_DB_INITIAL_CHUNK_TIME_INTERVAL='24 hours' # default: '24 hours'



## HTTPS: for docker-compose.https.yml
Expand Down
2 changes: 1 addition & 1 deletion tests/10-test-base-setup.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ setup_file() {

teardown_file() {
docker compose -f docker-compose.base.yml down --remove-orphans
docker container prune -f && docker volume prune -f
docker container prune -f && docker volume prune -af
}


Expand Down
2 changes: 1 addition & 1 deletion tests/11-test-setup-persistence.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load "./bats-helpers/bats-assert/load"

teardown() {
docker compose -f docker-compose.base.yml down --remove-orphans
docker container prune -f && docker volume prune -f
docker container prune -f && docker volume prune -af
}

@test "BASE: MQTT retain persistence across reboots" {
Expand Down
2 changes: 1 addition & 1 deletion tests/12-test-migrations.bats
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ setup() {

teardown() {
docker compose -f docker-compose.base.yml down --remove-orphans
docker container prune -f && docker volume prune -f
docker container prune -f && docker volume prune -af
rm -rf "$clone_dir"
rm -rf "$deploy_dir"
}
Expand Down
2 changes: 1 addition & 1 deletion tests/20-test-auth-setup.bats
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ setup_file() {

teardown_file() {
docker compose -f docker-compose.base.yml -f docker-compose.auth.yml down --remove-orphans
docker container prune -f && docker volume prune -f
docker container prune -f && docker volume prune -af
}


Expand Down
2 changes: 1 addition & 1 deletion tests/21-test-setup-with-custom-acl-rules.bats
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load "./bats-helpers/bats-assert/load"

teardown() {
docker compose -f docker-compose.base.yml -f docker-compose.auth.yml down --remove-orphans
docker container prune -f && docker volume prune -f
docker container prune -f && docker volume prune -af
git checkout -- broker/acl.conf
}

Expand Down

0 comments on commit 375398d

Please sign in to comment.