fix: change order keys for clickhouse tables
* wip * rename * fix: minor things before merging new order keys * fix: add maintenance mode * fix: update order by for session and events * fix: remove properties from sessions and final migration test * fix: set end date on migrations * fix: comments
This commit is contained in:
committed by
GitHub
parent
3b61b28290
commit
d7c6e88adc
@@ -117,7 +117,7 @@ export async function bootWorkers() {
|
||||
const worker = new GroupWorker<EventsQueuePayloadIncomingEvent['payload']>({
|
||||
queue,
|
||||
concurrency,
|
||||
logger: queueLogger,
|
||||
logger: process.env.NODE_ENV === 'production' ? queueLogger : undefined,
|
||||
blockingTimeoutSec: Number.parseFloat(
|
||||
process.env.EVENT_BLOCKING_TIMEOUT_SEC || '1',
|
||||
),
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { TABLE_NAMES, chQuery } from '@openpanel/db';
|
||||
|
||||
export async function ping() {
|
||||
if (process.env.DISABLE_PING) {
|
||||
return;
|
||||
}
|
||||
|
||||
const [res] = await chQuery<{ count: number }>(
|
||||
`SELECT COUNT(*) as count FROM ${TABLE_NAMES.events}`,
|
||||
);
|
||||
|
||||
@@ -96,7 +96,6 @@ export async function createSessionEnd(
|
||||
...payload,
|
||||
properties: {
|
||||
...payload.properties,
|
||||
...(session?.properties ?? {}),
|
||||
__bounce: session.is_bounce,
|
||||
},
|
||||
name: 'session_end',
|
||||
|
||||
@@ -319,7 +319,6 @@ describe('incomingEvent', () => {
|
||||
utm_content: '',
|
||||
utm_medium: '',
|
||||
revenue: 0,
|
||||
properties: {},
|
||||
project_id: projectId,
|
||||
device_id: 'last-device-123',
|
||||
profile_id: 'profile-123',
|
||||
|
||||
Reference in New Issue
Block a user