mirror of
https://github.com/docmost/docmost.git
synced 2026-08-19 17:31:37 +10:00
fix naming conflicts
This commit is contained in:
@@ -40,7 +40,7 @@ import WorkspaceApiKeys from "@/ee/api-key/pages/workspace-api-keys";
|
||||
import AiSettings from "@/ee/ai/pages/ai-settings.tsx";
|
||||
import BasePage from "@/ee/base/pages/base-page.tsx";
|
||||
import AuditLogs from "@/ee/audit/pages/audit-logs.tsx";
|
||||
import PageViewAnalytics from "@/ee/page-view/pages/page-view-analytics.tsx";
|
||||
import PageAnalytics from "@/ee/page-analytics/pages/page-analytics.tsx";
|
||||
import VerifiedPages from "@/ee/page-verification/pages/verified-pages.tsx";
|
||||
import TemplateList from "@/ee/template/pages/template-list";
|
||||
import TemplateEditor from "@/ee/template/pages/template-editor";
|
||||
@@ -128,7 +128,7 @@ export default function App() {
|
||||
<Route path={"ai"} element={<AiSettings />} />
|
||||
<Route path={"ai/mcp"} element={<AiSettings />} />
|
||||
<Route path={"audit"} element={<AuditLogs />} />
|
||||
<Route path={"analytics"} element={<PageViewAnalytics />} />
|
||||
<Route path={"analytics"} element={<PageAnalytics />} />
|
||||
<Route path={"verifications"} element={<VerifiedPages />} />
|
||||
{!isCloud() && <Route path={"license"} element={<License />} />}
|
||||
{isCloud() && <Route path={"billing"} element={<Billing />} />}
|
||||
|
||||
@@ -15,10 +15,10 @@ import { getAuditLogs } from "@/ee/audit/services/audit-service";
|
||||
import { getVerificationList } from "@/ee/page-verification/services/page-verification-service";
|
||||
import { getScimTokens } from "@/ee/scim/services/scim-token-service";
|
||||
import {
|
||||
getWorkspacePageViewDailyStats,
|
||||
getWorkspacePageViewTopPages,
|
||||
getWorkspacePageViewTotals,
|
||||
} from "@/ee/page-view/services/page-view-analytics-service";
|
||||
getWorkspacePageAnalyticsDailyStats,
|
||||
getWorkspacePageAnalyticsTopPages,
|
||||
getWorkspacePageAnalyticsTotals,
|
||||
} from "@/ee/page-analytics/services/page-analytics-service";
|
||||
|
||||
export const prefetchWorkspaceMembers = () => {
|
||||
const params: QueryParams = { limit: 100, query: "" };
|
||||
@@ -115,18 +115,18 @@ export const prefetchPageAnalytics = () => {
|
||||
const listParams = { ...dateRange, cursor: undefined, limit: 10 };
|
||||
|
||||
queryClient.prefetchQuery({
|
||||
queryKey: ["workspace-page-view-totals", dateRange],
|
||||
queryFn: () => getWorkspacePageViewTotals(dateRange),
|
||||
queryKey: ["workspace-page-analytics-totals", dateRange],
|
||||
queryFn: () => getWorkspacePageAnalyticsTotals(dateRange),
|
||||
});
|
||||
|
||||
queryClient.prefetchQuery({
|
||||
queryKey: ["workspace-page-view-top-pages", listParams],
|
||||
queryFn: () => getWorkspacePageViewTopPages(listParams),
|
||||
queryKey: ["workspace-page-analytics-top-pages", listParams],
|
||||
queryFn: () => getWorkspacePageAnalyticsTopPages(listParams),
|
||||
});
|
||||
|
||||
queryClient.prefetchQuery({
|
||||
queryKey: ["workspace-page-view-daily-stats", listParams],
|
||||
queryFn: () => getWorkspacePageViewDailyStats(listParams),
|
||||
queryKey: ["workspace-page-analytics-daily-stats", listParams],
|
||||
queryFn: () => getWorkspacePageAnalyticsDailyStats(listParams),
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ export const Feature = {
|
||||
SCIM: 'scim',
|
||||
PAGE_VERIFICATION: 'page:verification',
|
||||
AUDIT_LOGS: 'audit:logs',
|
||||
PAGE_ANALYTICS: 'analytics:page-views',
|
||||
PAGE_ANALYTICS: 'analytics:page-analytics',
|
||||
RETENTION: 'retention',
|
||||
SHARING_CONTROLS: 'sharing:controls',
|
||||
TEMPLATES: 'templates',
|
||||
|
||||
+8
-8
@@ -16,10 +16,10 @@ import { getAppName } from "@/lib/config";
|
||||
import Paginate from "@/components/common/paginate";
|
||||
import { useCursorPaginate } from "@/hooks/use-cursor-paginate";
|
||||
import {
|
||||
useWorkspacePageViewDailyStatsQuery,
|
||||
useWorkspacePageViewTopPagesQuery,
|
||||
useWorkspacePageViewTotalsQuery,
|
||||
} from "@/ee/page-view/queries/page-view-analytics-query";
|
||||
useWorkspacePageAnalyticsDailyStatsQuery,
|
||||
useWorkspacePageAnalyticsTopPagesQuery,
|
||||
useWorkspacePageAnalyticsTotalsQuery,
|
||||
} from "@/ee/page-analytics/queries/page-analytics-query";
|
||||
import { Link } from "react-router-dom";
|
||||
import { formatLocalized, useDateFnsLocale } from "@/lib/date-locale";
|
||||
|
||||
@@ -39,7 +39,7 @@ function formatNumber(value: number | null | undefined): string {
|
||||
return Number(value ?? 0).toLocaleString();
|
||||
}
|
||||
|
||||
export default function PageViewAnalytics() {
|
||||
export default function PageAnalytics() {
|
||||
const { t } = useTranslation();
|
||||
const locale = useDateFnsLocale();
|
||||
const [rangePreset, setRangePreset] = useState<RangePreset>("30");
|
||||
@@ -97,11 +97,11 @@ export default function PageViewAnalytics() {
|
||||
[dateRange, dailyCursor]
|
||||
);
|
||||
|
||||
const { data: totalsData } = useWorkspacePageViewTotalsQuery(dateRange);
|
||||
const { data: totalsData } = useWorkspacePageAnalyticsTotalsQuery(dateRange);
|
||||
const { data: topPagesData, isLoading: isTopPagesLoading } =
|
||||
useWorkspacePageViewTopPagesQuery(topPagesParams);
|
||||
useWorkspacePageAnalyticsTopPagesQuery(topPagesParams);
|
||||
const { data: dailyData, isLoading: isDailyLoading } =
|
||||
useWorkspacePageViewDailyStatsQuery(dailyParams);
|
||||
useWorkspacePageAnalyticsDailyStatsQuery(dailyParams);
|
||||
|
||||
const handleRangeChange = (value: RangePreset) => {
|
||||
if (value) {
|
||||
@@ -0,0 +1,44 @@
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getWorkspacePageAnalyticsDailyStats,
|
||||
getWorkspacePageAnalyticsTopPages,
|
||||
getWorkspacePageAnalyticsTotals,
|
||||
} from "@/ee/page-analytics/services/page-analytics-service";
|
||||
import type { IPagination } from "@/lib/types";
|
||||
import type {
|
||||
WorkspaceAnalyticsDailyStat,
|
||||
WorkspaceAnalyticsListParams,
|
||||
WorkspaceAnalyticsParams,
|
||||
WorkspaceAnalyticsTopPage,
|
||||
WorkspaceAnalyticsTotals,
|
||||
} from "@/ee/page-analytics/types/page-analytics.types";
|
||||
|
||||
export function useWorkspacePageAnalyticsTotalsQuery(
|
||||
params?: WorkspaceAnalyticsParams,
|
||||
) {
|
||||
return useQuery<WorkspaceAnalyticsTotals, Error>({
|
||||
queryKey: ["workspace-page-analytics-totals", params],
|
||||
queryFn: () => getWorkspacePageAnalyticsTotals(params),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
}
|
||||
|
||||
export function useWorkspacePageAnalyticsDailyStatsQuery(
|
||||
params?: WorkspaceAnalyticsListParams,
|
||||
) {
|
||||
return useQuery<IPagination<WorkspaceAnalyticsDailyStat>, Error>({
|
||||
queryKey: ["workspace-page-analytics-daily-stats", params],
|
||||
queryFn: () => getWorkspacePageAnalyticsDailyStats(params),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
}
|
||||
|
||||
export function useWorkspacePageAnalyticsTopPagesQuery(
|
||||
params?: WorkspaceAnalyticsListParams,
|
||||
) {
|
||||
return useQuery<IPagination<WorkspaceAnalyticsTopPage>, Error>({
|
||||
queryKey: ["workspace-page-analytics-top-pages", params],
|
||||
queryFn: () => getWorkspacePageAnalyticsTopPages(params),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
}
|
||||
+7
-7
@@ -6,25 +6,25 @@ import type {
|
||||
WorkspaceAnalyticsParams,
|
||||
WorkspaceAnalyticsTopPage,
|
||||
WorkspaceAnalyticsTotals,
|
||||
} from "@/ee/page-view/types/page-view-analytics.types";
|
||||
} from "@/ee/page-analytics/types/page-analytics.types";
|
||||
|
||||
export async function getWorkspacePageViewTotals(
|
||||
export async function getWorkspacePageAnalyticsTotals(
|
||||
params?: WorkspaceAnalyticsParams,
|
||||
): Promise<WorkspaceAnalyticsTotals> {
|
||||
const req = await api.post("/page-views/workspace-stats", params);
|
||||
const req = await api.post("/page-analytics/workspace-stats", params);
|
||||
return req.data;
|
||||
}
|
||||
|
||||
export async function getWorkspacePageViewDailyStats(
|
||||
export async function getWorkspacePageAnalyticsDailyStats(
|
||||
params?: WorkspaceAnalyticsListParams,
|
||||
): Promise<IPagination<WorkspaceAnalyticsDailyStat>> {
|
||||
const req = await api.post("/page-views/workspace-daily-stats", params);
|
||||
const req = await api.post("/page-analytics/workspace-daily-stats", params);
|
||||
return req.data;
|
||||
}
|
||||
|
||||
export async function getWorkspacePageViewTopPages(
|
||||
export async function getWorkspacePageAnalyticsTopPages(
|
||||
params?: WorkspaceAnalyticsListParams,
|
||||
): Promise<IPagination<WorkspaceAnalyticsTopPage>> {
|
||||
const req = await api.post("/page-views/workspace-top-pages", params);
|
||||
const req = await api.post("/page-analytics/workspace-top-pages", params);
|
||||
return req.data;
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
import { keepPreviousData, useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
getWorkspacePageViewDailyStats,
|
||||
getWorkspacePageViewTopPages,
|
||||
getWorkspacePageViewTotals,
|
||||
} from "@/ee/page-view/services/page-view-analytics-service";
|
||||
import type { IPagination } from "@/lib/types";
|
||||
import type {
|
||||
WorkspaceAnalyticsDailyStat,
|
||||
WorkspaceAnalyticsListParams,
|
||||
WorkspaceAnalyticsParams,
|
||||
WorkspaceAnalyticsTopPage,
|
||||
WorkspaceAnalyticsTotals,
|
||||
} from "@/ee/page-view/types/page-view-analytics.types";
|
||||
|
||||
export function useWorkspacePageViewTotalsQuery(
|
||||
params?: WorkspaceAnalyticsParams,
|
||||
) {
|
||||
return useQuery<WorkspaceAnalyticsTotals, Error>({
|
||||
queryKey: ["workspace-page-view-totals", params],
|
||||
queryFn: () => getWorkspacePageViewTotals(params),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
}
|
||||
|
||||
export function useWorkspacePageViewDailyStatsQuery(
|
||||
params?: WorkspaceAnalyticsListParams,
|
||||
) {
|
||||
return useQuery<IPagination<WorkspaceAnalyticsDailyStat>, Error>({
|
||||
queryKey: ["workspace-page-view-daily-stats", params],
|
||||
queryFn: () => getWorkspacePageViewDailyStats(params),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
}
|
||||
|
||||
export function useWorkspacePageViewTopPagesQuery(
|
||||
params?: WorkspaceAnalyticsListParams,
|
||||
) {
|
||||
return useQuery<IPagination<WorkspaceAnalyticsTopPage>, Error>({
|
||||
queryKey: ["workspace-page-view-top-pages", params],
|
||||
queryFn: () => getWorkspacePageViewTopPages(params),
|
||||
placeholderData: keepPreviousData,
|
||||
});
|
||||
}
|
||||
@@ -26,7 +26,7 @@ import KeyvRedis from '@keyv/redis';
|
||||
import { LoggerModule } from './common/logger/logger.module';
|
||||
import { ClsModule } from 'nestjs-cls';
|
||||
import { NoopAuditModule } from './integrations/audit/audit.module';
|
||||
import { NoopPageViewModule } from './integrations/page-view/page-view.module';
|
||||
import { NoopPageAnalyticsModule } from './integrations/page-analytics/page-analytics.module';
|
||||
import { ThrottleModule } from './integrations/throttle/throttle.module';
|
||||
|
||||
const enterpriseModules = [];
|
||||
@@ -51,7 +51,7 @@ try {
|
||||
}),
|
||||
LoggerModule,
|
||||
NoopAuditModule,
|
||||
NoopPageViewModule,
|
||||
NoopPageAnalyticsModule,
|
||||
CoreModule,
|
||||
DatabaseModule,
|
||||
EnvironmentModule,
|
||||
|
||||
@@ -15,7 +15,7 @@ export const Feature = {
|
||||
SCIM: 'scim',
|
||||
PAGE_VERIFICATION: 'page:verification',
|
||||
AUDIT_LOGS: 'audit:logs',
|
||||
PAGE_ANALYTICS: 'analytics:page-views',
|
||||
PAGE_ANALYTICS: 'analytics:page-analytics',
|
||||
RETENTION: 'retention',
|
||||
SHARING_CONTROLS: 'sharing:controls',
|
||||
VIEWER_COMMENTS: 'comment:viewer',
|
||||
|
||||
@@ -52,9 +52,9 @@ import {
|
||||
IAuditService,
|
||||
} from '../../integrations/audit/audit.service';
|
||||
import {
|
||||
PAGE_VIEW_SERVICE,
|
||||
IPageViewService,
|
||||
} from '../../integrations/page-view/page-view.service';
|
||||
PAGE_ANALYTICS_SERVICE,
|
||||
IPageAnalyticsService,
|
||||
} from '../../integrations/page-analytics/page-analytics.service';
|
||||
import { getPageTitle } from '../../common/helpers';
|
||||
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@@ -69,7 +69,7 @@ export class PageController {
|
||||
private readonly backlinkService: BacklinkService,
|
||||
private readonly labelService: LabelService,
|
||||
@Inject(AUDIT_SERVICE) private readonly auditService: IAuditService,
|
||||
@Inject(PAGE_VIEW_SERVICE) private readonly pageViewService: IPageViewService,
|
||||
@Inject(PAGE_ANALYTICS_SERVICE) private readonly pageAnalyticsService: IPageAnalyticsService,
|
||||
) {}
|
||||
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@@ -93,7 +93,7 @@ export class PageController {
|
||||
|
||||
const permissions = { canEdit, hasRestriction };
|
||||
|
||||
void this.pageViewService.track({
|
||||
void this.pageAnalyticsService.track({
|
||||
pageId: page.id,
|
||||
workspaceId: page.workspaceId,
|
||||
spaceId: page.spaceId,
|
||||
|
||||
@@ -36,9 +36,9 @@ import {
|
||||
IAuditService,
|
||||
} from '../../integrations/audit/audit.service';
|
||||
import {
|
||||
PAGE_VIEW_SERVICE,
|
||||
IPageViewService,
|
||||
} from '../../integrations/page-view/page-view.service';
|
||||
PAGE_ANALYTICS_SERVICE,
|
||||
IPageAnalyticsService,
|
||||
} from '../../integrations/page-analytics/page-analytics.service';
|
||||
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Controller('shares')
|
||||
@@ -51,8 +51,8 @@ export class ShareController {
|
||||
private readonly pageAccessService: PageAccessService,
|
||||
private readonly licenseCheckService: LicenseCheckService,
|
||||
@Inject(AUDIT_SERVICE) private readonly auditService: IAuditService,
|
||||
@Inject(PAGE_VIEW_SERVICE)
|
||||
private readonly pageViewService: IPageViewService,
|
||||
@Inject(PAGE_ANALYTICS_SERVICE)
|
||||
private readonly pageAnalyticsService: IPageAnalyticsService,
|
||||
) {}
|
||||
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@@ -85,7 +85,7 @@ export class ShareController {
|
||||
throw new NotFoundException('Shared page not found');
|
||||
}
|
||||
|
||||
void this.pageViewService.track({
|
||||
void this.pageAnalyticsService.track({
|
||||
pageId: shareData.page.id,
|
||||
workspaceId: workspace.id,
|
||||
spaceId: shareData.page.spaceId,
|
||||
|
||||
+6
-6
@@ -2,7 +2,7 @@ import { Kysely, sql } from 'kysely';
|
||||
|
||||
export async function up(db: Kysely<any>): Promise<void> {
|
||||
await db.schema
|
||||
.createTable('page_views')
|
||||
.createTable('page_analytics')
|
||||
.ifNotExists()
|
||||
.addColumn('id', 'uuid', (col) =>
|
||||
col.primaryKey().defaultTo(sql`gen_uuid_v7()`),
|
||||
@@ -32,16 +32,16 @@ export async function up(db: Kysely<any>): Promise<void> {
|
||||
.execute();
|
||||
|
||||
await db.schema
|
||||
.createIndex('idx_page_views_workspace_page_date')
|
||||
.createIndex('idx_page_analytics_workspace_page_date')
|
||||
.ifNotExists()
|
||||
.on('page_views')
|
||||
.on('page_analytics')
|
||||
.columns(['workspace_id', 'page_id', 'view_date'])
|
||||
.execute();
|
||||
|
||||
await sql`
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS
|
||||
uq_page_views_workspace_page_identity
|
||||
ON page_views (
|
||||
uq_page_analytics_workspace_page_identity
|
||||
ON page_analytics (
|
||||
workspace_id,
|
||||
page_id,
|
||||
COALESCE(user_id::text, visitor_id)
|
||||
@@ -50,5 +50,5 @@ export async function up(db: Kysely<any>): Promise<void> {
|
||||
}
|
||||
|
||||
export async function down(db: Kysely<any>): Promise<void> {
|
||||
await db.schema.dropTable('page_views').ifExists().execute();
|
||||
await db.schema.dropTable('page_analytics').ifExists().execute();
|
||||
}
|
||||
+2
-2
@@ -544,7 +544,7 @@ export interface PagePermissions {
|
||||
updatedAt: Generated<Timestamp>;
|
||||
}
|
||||
|
||||
export interface PageViews {
|
||||
export interface PageAnalytics {
|
||||
id: Generated<string>;
|
||||
workspaceId: string;
|
||||
pageId: string;
|
||||
@@ -676,7 +676,7 @@ export interface DB {
|
||||
pagePermissions: PagePermissions;
|
||||
pageHistory: PageHistory;
|
||||
pageLabels: PageLabels;
|
||||
pageViews: PageViews;
|
||||
pageAnalytics: PageAnalytics;
|
||||
pageVerifications: PageVerifications;
|
||||
pageVerifiers: PageVerifiers;
|
||||
pages: Pages;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Insertable, Selectable, Updateable } from 'kysely';
|
||||
import {
|
||||
AiChats,
|
||||
PageViews,
|
||||
PageAnalytics as _PageAnalytics,
|
||||
AiChatMessages,
|
||||
Attachments,
|
||||
BaseProperties,
|
||||
@@ -108,9 +108,9 @@ export type PageHistory = Selectable<History>;
|
||||
export type InsertablePageHistory = Insertable<History>;
|
||||
export type UpdatablePageHistory = Updateable<Omit<History, 'id'>>;
|
||||
|
||||
export type PageView = Selectable<PageViews>;
|
||||
export type InsertablePageView = Insertable<PageViews>;
|
||||
export type UpdatablePageView = Updateable<Omit<PageViews, 'id'>>;
|
||||
export type PageAnalytics = Selectable<_PageAnalytics>;
|
||||
export type InsertablePageAnalytics = Insertable<_PageAnalytics>;
|
||||
export type UpdatablePageAnalytics = Updateable<Omit<_PageAnalytics, 'id'>>;
|
||||
|
||||
// Comment
|
||||
export type Comment = Selectable<Comments>;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { PAGE_ANALYTICS_SERVICE, NoopPageAnalyticsService } from './page-analytics.service';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
providers: [
|
||||
{
|
||||
provide: PAGE_ANALYTICS_SERVICE,
|
||||
useClass: NoopPageAnalyticsService,
|
||||
},
|
||||
],
|
||||
exports: [PAGE_ANALYTICS_SERVICE],
|
||||
})
|
||||
export class NoopPageAnalyticsModule {}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
export type PageAnalyticsPayload = {
|
||||
pageId: string;
|
||||
workspaceId?: string;
|
||||
spaceId?: string;
|
||||
shareId?: string;
|
||||
userId?: string | null;
|
||||
visitorId?: string;
|
||||
};
|
||||
|
||||
export const PAGE_ANALYTICS_SERVICE = Symbol('PAGE_ANALYTICS_SERVICE');
|
||||
|
||||
export interface IPageAnalyticsService {
|
||||
track(payload: PageAnalyticsPayload): void | Promise<void>;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class NoopPageAnalyticsService implements IPageAnalyticsService {
|
||||
track(_payload: PageAnalyticsPayload): void {}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { PAGE_VIEW_SERVICE, NoopPageViewService } from './page-view.service';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
providers: [
|
||||
{
|
||||
provide: PAGE_VIEW_SERVICE,
|
||||
useClass: NoopPageViewService,
|
||||
},
|
||||
],
|
||||
exports: [PAGE_VIEW_SERVICE],
|
||||
})
|
||||
export class NoopPageViewModule {}
|
||||
@@ -1,21 +0,0 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
export type PageViewPayload = {
|
||||
pageId: string;
|
||||
workspaceId?: string;
|
||||
spaceId?: string;
|
||||
shareId?: string;
|
||||
userId?: string | null;
|
||||
visitorId?: string;
|
||||
};
|
||||
|
||||
export const PAGE_VIEW_SERVICE = Symbol('PAGE_VIEW_SERVICE');
|
||||
|
||||
export interface IPageViewService {
|
||||
track(payload: PageViewPayload): void | Promise<void>;
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class NoopPageViewService implements IPageViewService {
|
||||
track(_payload: PageViewPayload): void {}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ export enum QueueName {
|
||||
HISTORY_QUEUE = '{history-queue}',
|
||||
NOTIFICATION_QUEUE = '{notification-queue}',
|
||||
AUDIT_QUEUE = '{audit-queue}',
|
||||
PAGE_VIEW_QUEUE = '{page-view-queue}',
|
||||
PAGE_ANALYTICS_QUEUE = '{page-analytics-queue}',
|
||||
BASE_QUEUE = '{base-queue}',
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ export enum QueueJob {
|
||||
|
||||
AUDIT_LOG = 'audit-log',
|
||||
AUDIT_CLEANUP = 'audit-cleanup',
|
||||
PAGE_VIEW_TRACK = 'page-view-track',
|
||||
PAGE_VIEW_CLEANUP = 'page-view-cleanup',
|
||||
PAGE_ANALYTICS_TRACK = 'page-analytics-track',
|
||||
PAGE_ANALYTICS_CLEANUP = 'page-analytics-cleanup',
|
||||
|
||||
PDF_EXPORT_TASK = 'pdf-export-task',
|
||||
PDF_EXPORT_CLEANUP = 'pdf-export-cleanup',
|
||||
|
||||
@@ -93,7 +93,7 @@ import { GeneralQueueProcessor } from './processors/general-queue.processor';
|
||||
},
|
||||
}),
|
||||
BullModule.registerQueue({
|
||||
name: QueueName.PAGE_VIEW_QUEUE,
|
||||
name: QueueName.PAGE_ANALYTICS_QUEUE,
|
||||
defaultJobOptions: {
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true,
|
||||
|
||||
Reference in New Issue
Block a user