mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): events (#13003)
* refactor(server): events * chore: better type --------- Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
parent
95c67949f7
commit
a2d457b01d
28 changed files with 260 additions and 259 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import { Duration } from 'luxon';
|
||||
import semver from 'semver';
|
||||
import { OnEmit } from 'src/decorators';
|
||||
import { OnEvent } from 'src/decorators';
|
||||
import { IConfigRepository } from 'src/interfaces/config.interface';
|
||||
import {
|
||||
DatabaseExtension,
|
||||
|
|
@ -74,7 +74,7 @@ export class DatabaseService {
|
|||
this.logger.setContext(DatabaseService.name);
|
||||
}
|
||||
|
||||
@OnEmit({ event: 'app.bootstrap', priority: -200 })
|
||||
@OnEvent({ name: 'app.bootstrap', priority: -200 })
|
||||
async onBootstrap() {
|
||||
const version = await this.databaseRepository.getPostgresVersion();
|
||||
const current = semver.coerce(version);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue