Skip to content

Commit

Permalink
chore(server): queue handlers shouldn't increase concurrency (#2508)
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed May 22, 2023
1 parent 85c6cf4 commit 356f442
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/apps/microservices/src/processors.ts
Expand Up @@ -68,7 +68,7 @@ export class BackgroundTaskProcessor {
export class ObjectTaggingProcessor {
constructor(private smartInfoService: SmartInfoService) {}

@Process({ name: JobName.QUEUE_OBJECT_TAGGING, concurrency: 1 })
@Process({ name: JobName.QUEUE_OBJECT_TAGGING, concurrency: 0 })
async onQueueObjectTagging(job: Job<IBaseJob>) {
await this.smartInfoService.handleQueueObjectTagging(job.data);
}
Expand All @@ -88,7 +88,7 @@ export class ObjectTaggingProcessor {
export class FacialRecognitionProcessor {
constructor(private facialRecognitionService: FacialRecognitionService) {}

@Process({ name: JobName.QUEUE_RECOGNIZE_FACES, concurrency: 1 })
@Process({ name: JobName.QUEUE_RECOGNIZE_FACES, concurrency: 0 })
async onQueueRecognizeFaces(job: Job<IBaseJob>) {
await this.facialRecognitionService.handleQueueRecognizeFaces(job.data);
}
Expand All @@ -108,7 +108,7 @@ export class FacialRecognitionProcessor {
export class ClipEncodingProcessor {
constructor(private smartInfoService: SmartInfoService) {}

@Process({ name: JobName.QUEUE_ENCODE_CLIP, concurrency: 1 })
@Process({ name: JobName.QUEUE_ENCODE_CLIP, concurrency: 0 })
async onQueueClipEncoding(job: Job<IBaseJob>) {
await this.smartInfoService.handleQueueEncodeClip(job.data);
}
Expand Down Expand Up @@ -188,7 +188,7 @@ export class StorageTemplateMigrationProcessor {
export class ThumbnailGeneratorProcessor {
constructor(private mediaService: MediaService) {}

@Process({ name: JobName.QUEUE_GENERATE_THUMBNAILS, concurrency: 1 })
@Process({ name: JobName.QUEUE_GENERATE_THUMBNAILS, concurrency: 0 })
async onQueueGenerateThumbnails(job: Job<IBaseJob>) {
await this.mediaService.handleQueueGenerateThumbnails(job.data);
}
Expand All @@ -208,7 +208,7 @@ export class ThumbnailGeneratorProcessor {
export class VideoTranscodeProcessor {
constructor(private mediaService: MediaService) {}

@Process({ name: JobName.QUEUE_VIDEO_CONVERSION, concurrency: 1 })
@Process({ name: JobName.QUEUE_VIDEO_CONVERSION, concurrency: 0 })
async onQueueVideoConversion(job: Job<IBaseJob>): Promise<void> {
await this.mediaService.handleQueueVideoConversion(job.data);
}
Expand Down

0 comments on commit 356f442

Please sign in to comment.