Fix pg-boss worker not working with dynamic injection (#6119)
This commit is contained in:
@ -156,7 +156,7 @@ export class MessageQueueExplorer implements OnModuleInit {
|
||||
}),
|
||||
);
|
||||
|
||||
if (isRequestScoped && job.data) {
|
||||
if (isRequestScoped) {
|
||||
const contextId = createContextId();
|
||||
|
||||
if (this.moduleRef.registerRequestByContextId) {
|
||||
@ -164,7 +164,7 @@ export class MessageQueueExplorer implements OnModuleInit {
|
||||
{
|
||||
// Add workspaceId to the request object
|
||||
req: {
|
||||
workspaceId: job.data.workspaceId,
|
||||
workspaceId: job.data?.workspaceId,
|
||||
},
|
||||
},
|
||||
contextId,
|
||||
|
||||
Reference in New Issue
Block a user