mirror of
https://github.com/immich-app/immich.git
synced 2025-06-02 05:04:23 -04:00
18 lines
480 B
TypeScript
18 lines
480 B
TypeScript
import { QueueName } from '@app/job';
|
|
import { InjectQueue } from '@nestjs/bull';
|
|
import { Injectable, OnModuleInit } from '@nestjs/common';
|
|
import { Queue } from 'bull';
|
|
|
|
@Injectable()
|
|
export class MicroservicesService implements OnModuleInit {
|
|
constructor(
|
|
@InjectQueue(QueueName.CHECKSUM_GENERATION)
|
|
private generateChecksumQueue: Queue,
|
|
) {}
|
|
|
|
async onModuleInit() {
|
|
// wait for migration
|
|
await this.generateChecksumQueue.add({}, { delay: 10000 });
|
|
}
|
|
}
|