Merge beta into release #21

Merged
didirus merged 276 commits from beta into release 2025-11-01 13:04:25 +00:00
Showing only changes of commit e2f07a7848 - Show all commits

View File

@@ -48,6 +48,13 @@ pub async fn init_client_with_database(
"MergeTree()"
};
// For the Clickhouse database on the staging environment, set a TTL to avoid accumulating too much data
let ttl = if database == "staging_analytics" {
"TTL toDateTime(recorded) + INTERVAL 1 DAY"
} else {
""
};
client
.query(&format!(
"
@@ -67,6 +74,7 @@ pub async fn init_client_with_database(
headers Array(Tuple(String, String))
)
ENGINE = {engine}
{ttl}
PRIMARY KEY (project_id, recorded, ip)
SETTINGS index_granularity = 8192
"
@@ -93,6 +101,7 @@ pub async fn init_client_with_database(
headers Array(Tuple(String, String))
)
ENGINE = {engine}
{ttl}
PRIMARY KEY (project_id, recorded, ip)
SETTINGS index_granularity = 8192
"
@@ -117,6 +126,7 @@ pub async fn init_client_with_database(
parent UInt64
)
ENGINE = {engine}
{ttl}
PRIMARY KEY (project_id, recorded, user_id)
SETTINGS index_granularity = 8192
"