mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor: server events (#8204)
* refactor: server events * fix typo --------- Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
This commit is contained in:
parent
b6e4be72f0
commit
6e93ddf2f1
22 changed files with 166 additions and 181 deletions
|
|
@ -1,7 +1,8 @@
|
|||
import { SetMetadata } from '@nestjs/common';
|
||||
import { OnEvent, OnEventType } from '@nestjs/event-emitter';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
import { OnEventOptions } from '@nestjs/event-emitter/dist/interfaces';
|
||||
import _ from 'lodash';
|
||||
import { ServerAsyncEvent, ServerEvent } from 'src/interfaces/event.interface';
|
||||
import { setUnion } from 'src/utils/set';
|
||||
|
||||
// PostgreSQL uses a 16-bit integer to indicate the number of bound parameters. This means that the
|
||||
|
|
@ -125,5 +126,5 @@ export interface GenerateSqlQueries {
|
|||
/** Decorator to enable versioning/tracking of generated Sql */
|
||||
export const GenerateSql = (...options: GenerateSqlQueries[]) => SetMetadata(GENERATE_SQL_KEY, options);
|
||||
|
||||
export const OnEventInternal = (event: OnEventType, options?: OnEventOptions) =>
|
||||
export const OnServerEvent = (event: ServerEvent | ServerAsyncEvent, options?: OnEventOptions) =>
|
||||
OnEvent(event, { suppressErrors: false, ...options });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue