Skip to content

Commit

Permalink
set process jobName required
Browse files Browse the repository at this point in the history
  • Loading branch information
Weiko committed Jun 14, 2024
1 parent 5e38924 commit cc84a97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isString } from '@nestjs/common/utils/shared.utils';
import { PROCESS_METADATA } from 'src/engine/integrations/message-queue/message-queue.constants';

export interface MessageQueueProcessOptions {
jobName?: string;
jobName: string;
concurrency?: number;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export class MessageQueueExplorer implements OnModuleInit {
job: MessageQueueJob<MessageQueueJobData>,
) {
for (const [methodName, metadata] of processMetadataCollection) {
if (job.name === metadata?.jobName || !metadata?.jobName) {
if (job.name === metadata?.jobName) {
try {
await instance[methodName].call(instance, job.data);
} catch (err) {
Expand Down

0 comments on commit cc84a97

Please sign in to comment.