github medusajs/medusa v1.20.4

latest releases: v2.0.4, @medusajs/workflow-engine-redis@2.0.4, @medusajs/workflow-engine-inmemory@2.0.4...
7 months ago

Highlights

Introducing Worker Mode

This release ships Worker Mode, a new runtime mode for Medusa instances.

Worker Mode allows you to start a Medusa instance in a process separate from the main application process. An instance running in Worker Mode is useful for executing long-running or resource-heavy tasks in the background. Those tasks are offloaded to a separate process and will not affect the performance of the main application. Examples of tasks are importing data or updating a search index. While Worker Mode is especially good for resource-intensive tasks, we recommend always starting an instance in this mode if possible.

Worker Mode introduces three new runtime modes for your Medusa instance:

  • server: API Routes are registered, and no workers are started.
  • worker: API Routes are not registered, and workers are started.
  • shared: API routes are registered, and workers are started (the regular runtime mode + default).

The worker mode is configured in medusa-config.js:

// medusa-config.js
const projectConfig = {
  ...,
  database_url: "...",
  worker_mode: "worker",
};

In this release, the Redis Event Bus has been updated to leverage the worker architecture. Instantiating a Medusa instance with worker_mode: "server" and a different one with worker_mode: "worker" will separate background job processing from the public-facing main application, given that the Redis Event Bus module is installed.

Features

Bugs

Chores

  • chore: Deprecate extra in favor of driver options by @adrien2p in #6772
  • chore: merge money amounts and price set money amounts by @riqwan in #6768
  • chore: pricing models uses standardized relationships attributes by @riqwan in #6767
  • chore: update naming in abstract service to dto specifics by @riqwan in #6763
  • chore: add TSDocs to the API Key Module by @shahednasser in #6785
  • chore(docs): Updated UI Reference by @github-actions in #6754

Documentation

New Contributors

Full Changelog: v1.20.3...v1.20.4

Don't miss a new medusa release

NewReleases is sending notifications on new releases.