-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Not sure if this a bug or intended behavior, but it seems that worker code gets inadvertently executed during the main nuxt dev execution.
Example worker file server/workers/send-email.ts:
console.log('worker module executed') // <---- this prints out after running `nuxt dev`
export default defineWorker<SendEmailName, SendEmailData, SendEmailResult>({
name: 'send-email',
async processor(job) {
// ...
},
options: {
concurrency: 10
}
})My expectation would be, no worker code is executed in the main nuxt process to match process isolation you would see in production env. It should only execute when running via its dedicated script .output/server/workers/index.mjs or .nuxt/dev/workers/index.mjs.
Any help is much appreciated, thank you for making this Nuxt module.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed