chore: Update medusa exec worker mode (#14145)
* chore: Update medusa exec worker mode * chore: Update medusa exec worker mode * Create cuddly-numbers-camp.md
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
chore: Update medusa exec worker mode
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
import { ExecArgs } from "@medusajs/framework/types"
|
import { ExecArgs } from "@medusajs/framework/types"
|
||||||
import { ContainerRegistrationKeys, dynamicImport, isFileSkipped, } from "@medusajs/framework/utils"
|
import {
|
||||||
|
ContainerRegistrationKeys,
|
||||||
|
dynamicImport,
|
||||||
|
isFileSkipped,
|
||||||
|
} from "@medusajs/framework/utils"
|
||||||
import express from "express"
|
import express from "express"
|
||||||
import { existsSync } from "fs"
|
import { existsSync } from "fs"
|
||||||
import path from "path"
|
import path from "path"
|
||||||
@@ -37,8 +41,7 @@ export default async function exec({ file, args }: Options) {
|
|||||||
throw new Error(`File doesn't default export a function to execute.`)
|
throw new Error(`File doesn't default export a function to execute.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
// set worker mode
|
process.env.MEDUSA_WORKER_MODE = "server"
|
||||||
process.env.MEDUSA_WORKER_MODE = "worker"
|
|
||||||
|
|
||||||
const { container } = await loaders({
|
const { container } = await loaders({
|
||||||
directory,
|
directory,
|
||||||
|
|||||||
Reference in New Issue
Block a user