Add initial baby-names service
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
import { InjectQueue } from '@nestjs/bull';
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
import { Queue } from 'bull';
|
||||
import { UploadedObjectInfo } from 'minio/dist/main/internal/type';
|
||||
import { MinioService } from 'src/minio/minio.service';
|
||||
|
||||
@@ -12,10 +10,7 @@ export class KvService {
|
||||
private readonly kvMetadataPath = `${this.kvPrefix}/${this.kvMetadataFileName}`;
|
||||
private readonly logger: Logger = new Logger(KvService.name);
|
||||
|
||||
constructor(
|
||||
private readonly minioService: MinioService,
|
||||
@InjectQueue('kv') private kvProcessingQueue: Queue,
|
||||
) {}
|
||||
constructor(private readonly minioService: MinioService) {}
|
||||
|
||||
public generateFilePath(namespace: string, key: string): string {
|
||||
return `${this.kvPrefix}/${namespace}/${key}`;
|
||||
@@ -123,7 +118,6 @@ export class KvService {
|
||||
};
|
||||
await this.setMetadataFile(Buffer.from(JSON.stringify(metadata)));
|
||||
this.logger.verbose(`Claimed namespace ${namespace}`);
|
||||
this.kvProcessingQueue.add('namespaceModeration', metadata[namespace]);
|
||||
return metadata[namespace];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user