fix cron jobs logs table name

This commit is contained in:
Jordi Enric committed 2024-11-20 19:11:17 +01:00
1 parent eaaab965c8
commit f10637ffdf
3 files changed
+3 -4

No files matched your search

@@ -363,7 +363,7 @@ export enum LogsTableName {
POSTGREST = 'postgrest_logs',
SUPAVISOR = 'supavisor_logs',
WAREHOUSE = 'warehouse_logs',
PG_CRON = 'postgres_logs',
PG_CRON = 'pg_cron_logs',
}
export const LOGS_TABLES = {
@@ -391,7 +391,7 @@ export const LOGS_SOURCE_DESCRIPTION = {
[LogsTableName.POSTGREST]: 'RESTful API web server logs',
[LogsTableName.SUPAVISOR]: 'Cloud-native Postgres connection pooler logs',
[LogsTableName.WAREHOUSE]: 'Logs obtained from a data warehouse collection',
[LogsTableName.PG_CRON]: 'Logs obtained from pg_cron',
[LogsTableName.PG_CRON]: 'Postgres logs from pg_cron cron jobs',
}
export const genQueryParams = (params: { [k: string]: string }) => {
@@ -212,7 +212,7 @@ limit ${limit}
limit ${limit}
`
case 'pg_cron':
case 'pg_cron_logs':
const baseWhere = `where (parsed.application_name = 'pg_cron' OR event_message LIKE '%cron job%')`
const pgCronWhere = where ? `${baseWhere} AND ${where.substring(6)}` : baseWhere
@@ -55,7 +55,6 @@ const useLogsQuery = (
const usesWith = checkForWithClause(params.sql || '')
const usesILIKE = checkForILIKEClause(params.sql || '')
const usesWildcard = checkForWildcard(params.sql || '')
const {
data,