feat: per-project workflow settings, statistics and "my work" home
Per-project settings (owners/admins, «Configuración» tab):
- Statuses with category (TODO, IN_PROGRESS, QA, DONE, CANCELLED), colour and
"requires reason"; configurable transitions; ticket types (icon, colour) and
areas. Defaults are the previous fixed values; projects created before keep
them without migration.
- Values are archived, never deleted: tickets, history and statistics keep
referring to them. Validated in the domain (ProjectSettingsChangedEvent).
- Releases, board, tracking and "my work" use categories, so custom statuses
keep working. Status changes carry name/category metadata for history.
- GraphQL: status/type/area are strings (breaking for clients sending enum
literals); Project.settings, updateProjectSettings, statusCategory,
myIssues(categories). REST: PUT /projects/{project}/settings, category filters.
- Read model: statusCategory on issues (backfilled at startup).
Statistics («Estadísticas» tab):
- New issue_timeline projection; pure functions compute created vs resolved,
cumulative flow, cycle/lead time (avg + p85), throughput per person, QA
pass/fail and release burnup. GraphQL Project.analytics(days),
Release.burnup; REST /projects/{project}/analytics, /releases/{id}/burnup.
- Web: SVG charts with validated light/dark palette, crosshair tooltip,
keyboard navigation, legend and data table.
Home "Mi trabajo": my open tickets across projects grouped by category (QA
failures first), tickets waiting for QA, upcoming releases and "Ir a…".
Tests: domain/application specs, e2e scenario for settings and analytics,
facade tests. Docs, READMEs, schema.gql/openapi.json and Word/PDF updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,9 @@ Adaptadores de salida del tracker.
|
||||
## Contenido
|
||||
|
||||
- `postgres/`: lookups de escritura (`project_keys`, `issue_sequences`, `release_names`) y `ReleaseIssuesRepository` (consulta el event store).
|
||||
- `mongo/`: esquemas del read model, repositorios `Find*` y `UpsertMaterialized*` (upsert idempotente por versión).
|
||||
- `mongo/`: esquemas del read model (incluida la línea temporal `issue_timeline`), repositorios `Find*` y
|
||||
`UpsertMaterialized*` (upsert idempotente por versión) y `StatusCategoryBackfill` (al arrancar, rellena la categoría
|
||||
del estado en los tickets proyectados antes de existir).
|
||||
- `realtime/`: `RedisChangeFeed` (canales de Redis pub/sub por proyecto, ticket y usuario).
|
||||
- `identity/`: `IdentityUserDirectory`, capa anticorrupción hacia el contexto de identidad.
|
||||
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
|
||||
"sourceRoot": "libs/api/tracker/infrastructure/src",
|
||||
"projectType": "library",
|
||||
"tags": [
|
||||
"scope:api-tracker",
|
||||
"type:infrastructure"
|
||||
],
|
||||
"tags": ["scope:api-tracker", "type:infrastructure"],
|
||||
"// targets": "to see all targets run: nx show project api-tracker-infrastructure --web",
|
||||
"targets": {}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectModel } from '@nestjs/mongoose';
|
||||
import {
|
||||
CrossProjectIssueFilter,
|
||||
FindActivityRepository,
|
||||
FindCommentsRepository,
|
||||
FindIssuesRepository,
|
||||
FindProjectsRepository,
|
||||
FindReleasesRepository,
|
||||
FindTimelineRepository,
|
||||
IssueFilter,
|
||||
Page,
|
||||
} from '@task-stream/api/tracker/application';
|
||||
@@ -13,14 +15,16 @@ import {
|
||||
ActivityReadModel,
|
||||
CommentReadModel,
|
||||
CountBy,
|
||||
FINISHED_STATUSES,
|
||||
defaultProjectSettings,
|
||||
IssueReadModel,
|
||||
IssueStatus,
|
||||
IssueTimelineEntry,
|
||||
ProjectReadModel,
|
||||
ProjectRole,
|
||||
ProjectStatsReadModel,
|
||||
ReleaseProgressReadModel,
|
||||
ReleaseReadModel,
|
||||
ReleaseStatus,
|
||||
StatusCategory,
|
||||
UserRefReadModel,
|
||||
} from '@task-stream/api/tracker/domain';
|
||||
import { FilterQuery, Model } from 'mongoose';
|
||||
@@ -31,6 +35,7 @@ import {
|
||||
ProjectDoc,
|
||||
ReadModels,
|
||||
ReleaseDoc,
|
||||
TimelineDoc,
|
||||
fromDoc,
|
||||
issueFromDoc,
|
||||
} from './read-model.schemas';
|
||||
@@ -40,9 +45,15 @@ import {
|
||||
const escapeRegex = (text: string) =>
|
||||
text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
||||
|
||||
const FINISHED = [StatusCategory.DONE, StatusCategory.CANCELLED];
|
||||
|
||||
function toProject(doc: ProjectDoc): ProjectReadModel {
|
||||
const { memberIds: _ignored, ...rest } = doc;
|
||||
return fromDoc(rest);
|
||||
// Projects projected before settings existed use the defaults.
|
||||
return {
|
||||
...fromDoc(rest),
|
||||
settings: rest.settings ?? defaultProjectSettings(),
|
||||
};
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@@ -123,6 +134,29 @@ export class MongoFindIssuesRepository extends FindIssuesRepository {
|
||||
return { items: docs.map(issueFromDoc), total };
|
||||
}
|
||||
|
||||
async searchAcross(
|
||||
filter: CrossProjectIssueFilter,
|
||||
): Promise<Page<IssueReadModel>> {
|
||||
if (filter.projectIds.length === 0) return { items: [], total: 0 };
|
||||
const query: Record<string, unknown> = {
|
||||
projectId: { $in: filter.projectIds },
|
||||
};
|
||||
if (filter.assigneeId) query['assignee.id'] = filter.assigneeId;
|
||||
if (filter.statuses?.length) query['status'] = { $in: filter.statuses };
|
||||
if (filter.categories?.length)
|
||||
query['statusCategory'] = { $in: filter.categories };
|
||||
const [docs, total] = await Promise.all([
|
||||
this.issues
|
||||
.find(query)
|
||||
.sort({ updatedAt: -1 })
|
||||
.skip(filter.offset)
|
||||
.limit(filter.limit)
|
||||
.lean<IssueDoc[]>(),
|
||||
this.issues.countDocuments(query),
|
||||
]);
|
||||
return { items: docs.map(issueFromDoc), total };
|
||||
}
|
||||
|
||||
async stats(projectId: string): Promise<ProjectStatsReadModel> {
|
||||
const countBy = (field: string) => [
|
||||
{ $group: { _id: `$${field}`, count: { $sum: 1 } } },
|
||||
@@ -131,7 +165,7 @@ export class MongoFindIssuesRepository extends FindIssuesRepository {
|
||||
const [facets] = await this.issues.aggregate<{
|
||||
total: { count: number }[];
|
||||
open: { count: number }[];
|
||||
byStatus: { _id: IssueStatus; count: number }[];
|
||||
byStatus: { _id: string; count: number }[];
|
||||
byType: { _id: string; count: number }[];
|
||||
byPriority: { _id: string; count: number }[];
|
||||
byArea: { _id: string | null; count: number }[];
|
||||
@@ -142,7 +176,7 @@ export class MongoFindIssuesRepository extends FindIssuesRepository {
|
||||
$facet: {
|
||||
total: [{ $count: 'count' }],
|
||||
open: [
|
||||
{ $match: { status: { $nin: FINISHED_STATUSES } } },
|
||||
{ $match: { statusCategory: { $nin: FINISHED } } },
|
||||
{ $count: 'count' },
|
||||
],
|
||||
byStatus: countBy('status'),
|
||||
@@ -150,7 +184,7 @@ export class MongoFindIssuesRepository extends FindIssuesRepository {
|
||||
byPriority: countBy('priority'),
|
||||
byArea: countBy('area'),
|
||||
byAssignee: [
|
||||
{ $match: { status: { $nin: FINISHED_STATUSES } } },
|
||||
{ $match: { statusCategory: { $nin: FINISHED } } },
|
||||
...countBy('assignee'),
|
||||
],
|
||||
},
|
||||
@@ -173,23 +207,36 @@ export class MongoFindIssuesRepository extends FindIssuesRepository {
|
||||
};
|
||||
}
|
||||
|
||||
async findByProject(projectId: string): Promise<IssueReadModel[]> {
|
||||
const docs = await this.issues.find({ projectId }).lean<IssueDoc[]>();
|
||||
return docs.map(issueFromDoc);
|
||||
}
|
||||
|
||||
async releaseProgress(releaseId: string): Promise<ReleaseProgressReadModel> {
|
||||
const rows = await this.issues.aggregate<{
|
||||
_id: IssueStatus;
|
||||
_id: { status: string; category: StatusCategory };
|
||||
count: number;
|
||||
}>([
|
||||
{ $match: { 'release.id': releaseId } },
|
||||
{ $group: { _id: '$status', count: { $sum: 1 } } },
|
||||
{
|
||||
$group: {
|
||||
_id: { status: '$status', category: '$statusCategory' },
|
||||
count: { $sum: 1 },
|
||||
},
|
||||
},
|
||||
]);
|
||||
const total = rows.reduce((sum, r) => sum + r.count, 0);
|
||||
const finished = rows
|
||||
.filter((r) => FINISHED_STATUSES.includes(r._id))
|
||||
.filter((r) => FINISHED.includes(r._id.category))
|
||||
.reduce((sum, r) => sum + r.count, 0);
|
||||
const byStatus = new Map<string, number>();
|
||||
for (const r of rows)
|
||||
byStatus.set(r._id.status, (byStatus.get(r._id.status) ?? 0) + r.count);
|
||||
return {
|
||||
total,
|
||||
finished,
|
||||
percent: total === 0 ? 0 : Math.round((finished / total) * 100),
|
||||
byStatus: rows.map((r) => ({ key: r._id, count: r.count })),
|
||||
byStatus: [...byStatus].map(([key, count]) => ({ key, count })),
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -197,6 +244,8 @@ export class MongoFindIssuesRepository extends FindIssuesRepository {
|
||||
function toMongoFilter(filter: IssueFilter): FilterQuery<IssueDoc> {
|
||||
const query: FilterQuery<IssueDoc> = { projectId: filter.projectId };
|
||||
if (filter.statuses?.length) query.status = { $in: filter.statuses };
|
||||
if (filter.categories?.length)
|
||||
query['statusCategory'] = { $in: filter.categories };
|
||||
if (filter.types?.length) query['type'] = { $in: filter.types };
|
||||
if (filter.areas?.length) query['area'] = { $in: filter.areas };
|
||||
if (filter.priorities?.length) query['priority'] = { $in: filter.priorities };
|
||||
@@ -273,6 +322,25 @@ export class MongoFindReleasesRepository extends FindReleasesRepository {
|
||||
.lean<ReleaseDoc[]>();
|
||||
return docs.map(fromDoc);
|
||||
}
|
||||
|
||||
async findUpcoming(
|
||||
projectIds: string[],
|
||||
limit: number,
|
||||
): Promise<ReleaseReadModel[]> {
|
||||
if (projectIds.length === 0) return [];
|
||||
const docs = await this.releases
|
||||
.find({ projectId: { $in: projectIds }, status: ReleaseStatus.PLANNED })
|
||||
.lean<ReleaseDoc[]>();
|
||||
// Ascending targetDate puts nulls first in Mongo: sort here instead.
|
||||
return docs
|
||||
.map(fromDoc)
|
||||
.sort(
|
||||
(a, b) =>
|
||||
(a.targetDate ?? '9999').localeCompare(b.targetDate ?? '9999') ||
|
||||
a.name.localeCompare(b.name),
|
||||
)
|
||||
.slice(0, limit);
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@@ -301,3 +369,21 @@ export class MongoFindActivityRepository extends FindActivityRepository {
|
||||
return docs.map(fromDoc);
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class MongoFindTimelineRepository extends FindTimelineRepository {
|
||||
constructor(
|
||||
@InjectModel(ReadModels.Timeline)
|
||||
private readonly timeline: Model<TimelineDoc>,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
async findByProject(projectId: string): Promise<IssueTimelineEntry[]> {
|
||||
const docs = await this.timeline
|
||||
.find({ projectId })
|
||||
.sort({ at: 1 })
|
||||
.lean<TimelineDoc[]>();
|
||||
return docs.map(fromDoc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
CommentReadModel,
|
||||
IssueLinkReadModel,
|
||||
IssueReadModel,
|
||||
IssueTimelineEntry,
|
||||
ProjectReadModel,
|
||||
ReleaseReadModel,
|
||||
} from '@task-stream/api/tracker/domain';
|
||||
@@ -21,6 +22,7 @@ export type IssueDoc = Doc<Omit<IssueReadModel, 'links'>> & {
|
||||
export type CommentDoc = Doc<CommentReadModel>;
|
||||
export type ReleaseDoc = Doc<ReleaseReadModel>;
|
||||
export type ActivityDoc = Doc<ActivityReadModel>;
|
||||
export type TimelineDoc = Doc<IssueTimelineEntry>;
|
||||
|
||||
export const ReadModels = {
|
||||
Project: 'ProjectReadModel',
|
||||
@@ -28,6 +30,7 @@ export const ReadModels = {
|
||||
Comment: 'CommentReadModel',
|
||||
Release: 'ReleaseReadModel',
|
||||
Activity: 'ActivityReadModel',
|
||||
Timeline: 'IssueTimelineReadModel',
|
||||
} as const;
|
||||
|
||||
const userRef = { _id: false, id: String, name: String };
|
||||
@@ -59,6 +62,7 @@ export const IssueSchema = new Schema<IssueDoc>(
|
||||
projectId: { type: String, index: true },
|
||||
key: { type: String, unique: true },
|
||||
status: String,
|
||||
statusCategory: String,
|
||||
reporter: userRef,
|
||||
assignee: userRef,
|
||||
release: { _id: false, id: String, name: String },
|
||||
@@ -70,6 +74,7 @@ export const IssueSchema = new Schema<IssueDoc>(
|
||||
{ ...loose, collection: 'issues_view' },
|
||||
);
|
||||
IssueSchema.index({ projectId: 1, status: 1, updatedAt: -1 });
|
||||
IssueSchema.index({ projectId: 1, statusCategory: 1 });
|
||||
IssueSchema.index({ 'assignee.id': 1 });
|
||||
IssueSchema.index({ 'release.id': 1 });
|
||||
IssueSchema.index({ title: 'text', description: 'text', key: 'text' });
|
||||
@@ -102,12 +107,20 @@ export const ActivitySchema = new Schema<ActivityDoc>(
|
||||
ActivitySchema.index({ projectId: 1, occurredAt: -1 });
|
||||
ActivitySchema.index({ issueId: 1, occurredAt: -1 });
|
||||
|
||||
/** Every status and release step of every ticket (statistics). */
|
||||
export const TimelineSchema = new Schema<TimelineDoc>(
|
||||
{ _id: String, projectId: String, issueId: String, at: String },
|
||||
{ ...loose, collection: 'issue_timeline' },
|
||||
);
|
||||
TimelineSchema.index({ projectId: 1, at: 1 });
|
||||
|
||||
export const READ_MODEL_SCHEMAS = [
|
||||
{ name: ReadModels.Project, schema: ProjectSchema },
|
||||
{ name: ReadModels.Issue, schema: IssueSchema },
|
||||
{ name: ReadModels.Comment, schema: CommentSchema },
|
||||
{ name: ReadModels.Release, schema: ReleaseSchema },
|
||||
{ name: ReadModels.Activity, schema: ActivitySchema },
|
||||
{ name: ReadModels.Timeline, schema: TimelineSchema },
|
||||
];
|
||||
|
||||
export function fromDoc<T extends { _id: string }>(
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
import { Injectable, Logger, OnApplicationBootstrap } from '@nestjs/common';
|
||||
import { InjectModel } from '@nestjs/mongoose';
|
||||
import { ProjectWorkflow } from '@task-stream/api/tracker/domain';
|
||||
import { Model } from 'mongoose';
|
||||
import { IssueDoc, ProjectDoc, ReadModels } from './read-model.schemas';
|
||||
|
||||
/**
|
||||
* Tickets projected before statuses had categories lack `statusCategory`;
|
||||
* fill it in once at startup from each project's settings (or the defaults).
|
||||
*/
|
||||
@Injectable()
|
||||
export class StatusCategoryBackfill implements OnApplicationBootstrap {
|
||||
private readonly logger = new Logger(StatusCategoryBackfill.name);
|
||||
|
||||
constructor(
|
||||
@InjectModel(ReadModels.Issue) private readonly issues: Model<IssueDoc>,
|
||||
@InjectModel(ReadModels.Project)
|
||||
private readonly projects: Model<ProjectDoc>,
|
||||
) {}
|
||||
|
||||
async onApplicationBootstrap(): Promise<void> {
|
||||
const missing = { statusCategory: { $exists: false } };
|
||||
const groups = await this.issues.aggregate<{
|
||||
_id: { projectId: string; status: string };
|
||||
}>([
|
||||
{ $match: missing },
|
||||
{ $group: { _id: { projectId: '$projectId', status: '$status' } } },
|
||||
]);
|
||||
if (groups.length === 0) return;
|
||||
|
||||
const projectIds = [...new Set(groups.map((g) => g._id.projectId))];
|
||||
const projects = await this.projects
|
||||
.find({ _id: { $in: projectIds } }, { settings: 1 })
|
||||
.lean<Pick<ProjectDoc, '_id' | 'settings'>[]>();
|
||||
const workflows = new Map(
|
||||
projects.map((p) => [
|
||||
p._id,
|
||||
p.settings
|
||||
? new ProjectWorkflow(p.settings)
|
||||
: ProjectWorkflow.default(),
|
||||
]),
|
||||
);
|
||||
const result = await this.issues.bulkWrite(
|
||||
groups.map(({ _id: { projectId, status } }) => ({
|
||||
updateMany: {
|
||||
filter: { ...missing, projectId, status },
|
||||
update: {
|
||||
$set: {
|
||||
statusCategory: (
|
||||
workflows.get(projectId) ?? ProjectWorkflow.default()
|
||||
).categoryOf(status),
|
||||
},
|
||||
},
|
||||
},
|
||||
})),
|
||||
);
|
||||
this.logger.log(
|
||||
`Status category filled in on ${result.modifiedCount} tickets`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -6,14 +6,17 @@ import {
|
||||
UpsertMaterializedIssueRepository,
|
||||
UpsertMaterializedProjectRepository,
|
||||
UpsertMaterializedReleaseRepository,
|
||||
UpsertMaterializedTimelineRepository,
|
||||
} from '@task-stream/api/tracker/application';
|
||||
import {
|
||||
ActivityReadModel,
|
||||
CommentReadModel,
|
||||
IssueLinkReadModel,
|
||||
IssueReadModel,
|
||||
IssueTimelineEntry,
|
||||
ProjectReadModel,
|
||||
ReleaseReadModel,
|
||||
StatusCategory,
|
||||
} from '@task-stream/api/tracker/domain';
|
||||
import { Model } from 'mongoose';
|
||||
import {
|
||||
@@ -23,6 +26,7 @@ import {
|
||||
ProjectDoc,
|
||||
ReadModels,
|
||||
ReleaseDoc,
|
||||
TimelineDoc,
|
||||
} from './read-model.schemas';
|
||||
import { upsertIfNewer } from './upsert-if-newer';
|
||||
|
||||
@@ -101,6 +105,19 @@ export class MongoUpsertMaterializedIssueRepository extends UpsertMaterializedIs
|
||||
await this.issues.updateOne({ _id: issueId }, { $set: { commentCount } });
|
||||
}
|
||||
|
||||
async recategorize(
|
||||
projectId: string,
|
||||
categories: Record<string, StatusCategory>,
|
||||
) {
|
||||
const ops = Object.entries(categories).map(([status, category]) => ({
|
||||
updateMany: {
|
||||
filter: { projectId, status, statusCategory: { $ne: category } },
|
||||
update: { $set: { statusCategory: category } },
|
||||
},
|
||||
}));
|
||||
if (ops.length) await this.issues.bulkWrite(ops);
|
||||
}
|
||||
|
||||
async renameRelease(releaseId: string, name: string) {
|
||||
await this.issues.updateMany(
|
||||
{ 'release.id': releaseId },
|
||||
@@ -167,3 +184,21 @@ export class MongoUpsertMaterializedActivityRepository extends UpsertMaterialize
|
||||
return result.upsertedCount > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class MongoUpsertMaterializedTimelineRepository extends UpsertMaterializedTimelineRepository {
|
||||
constructor(
|
||||
@InjectModel(ReadModels.Timeline)
|
||||
private readonly timeline: Model<TimelineDoc>,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
async record({ id, ...fields }: IssueTimelineEntry): Promise<void> {
|
||||
await this.timeline.updateOne(
|
||||
{ _id: id },
|
||||
{ $setOnInsert: fields },
|
||||
{ upsert: true },
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
FindIssuesRepository,
|
||||
FindProjectsRepository,
|
||||
FindReleasesRepository,
|
||||
FindTimelineRepository,
|
||||
IssueNumbersRepository,
|
||||
ProjectKeysRepository,
|
||||
ReleaseIssuesRepository,
|
||||
@@ -18,6 +19,7 @@ import {
|
||||
UpsertMaterializedIssueRepository,
|
||||
UpsertMaterializedProjectRepository,
|
||||
UpsertMaterializedReleaseRepository,
|
||||
UpsertMaterializedTimelineRepository,
|
||||
UserDirectory,
|
||||
} from '@task-stream/api/tracker/application';
|
||||
import { IdentityUserDirectory } from './identity/identity-user-directory';
|
||||
@@ -27,6 +29,7 @@ import {
|
||||
MongoFindIssuesRepository,
|
||||
MongoFindProjectsRepository,
|
||||
MongoFindReleasesRepository,
|
||||
MongoFindTimelineRepository,
|
||||
} from './mongo/find.repositories';
|
||||
import { READ_MODEL_SCHEMAS } from './mongo/read-model.schemas';
|
||||
import {
|
||||
@@ -35,7 +38,9 @@ import {
|
||||
MongoUpsertMaterializedIssueRepository,
|
||||
MongoUpsertMaterializedProjectRepository,
|
||||
MongoUpsertMaterializedReleaseRepository,
|
||||
MongoUpsertMaterializedTimelineRepository,
|
||||
} from './mongo/upsert-materialized.repositories';
|
||||
import { StatusCategoryBackfill } from './mongo/status-category.backfill';
|
||||
import { LOOKUP_ENTITIES } from './postgres/lookup.entities';
|
||||
import {
|
||||
PostgresIssueNumbersRepository,
|
||||
@@ -60,6 +65,7 @@ const PORTS = [
|
||||
{ provide: FindCommentsRepository, useClass: MongoFindCommentsRepository },
|
||||
{ provide: FindReleasesRepository, useClass: MongoFindReleasesRepository },
|
||||
{ provide: FindActivityRepository, useClass: MongoFindActivityRepository },
|
||||
{ provide: FindTimelineRepository, useClass: MongoFindTimelineRepository },
|
||||
{
|
||||
provide: UpsertMaterializedProjectRepository,
|
||||
useClass: MongoUpsertMaterializedProjectRepository,
|
||||
@@ -80,6 +86,10 @@ const PORTS = [
|
||||
provide: UpsertMaterializedActivityRepository,
|
||||
useClass: MongoUpsertMaterializedActivityRepository,
|
||||
},
|
||||
{
|
||||
provide: UpsertMaterializedTimelineRepository,
|
||||
useClass: MongoUpsertMaterializedTimelineRepository,
|
||||
},
|
||||
// Realtime → Redis pub/sub
|
||||
{ provide: ChangeFeed, useClass: RedisChangeFeed },
|
||||
// Identity context (anti-corruption layer)
|
||||
@@ -93,7 +103,7 @@ const PORTS = [
|
||||
TypeOrmModule.forFeature(LOOKUP_ENTITIES),
|
||||
MongooseModule.forFeature(READ_MODEL_SCHEMAS),
|
||||
],
|
||||
providers: PORTS,
|
||||
providers: [...PORTS, StatusCategoryBackfill],
|
||||
exports: PORTS.map((port) => port.provide),
|
||||
})
|
||||
export class TrackerInfrastructureModule {}
|
||||
|
||||
Reference in New Issue
Block a user