what: - migrates medusa package to swc/jest - migrates plugins integration tests to swc/jest - parallelises a few of the heavy test packages - fixes typeorm circular dependencies **Unit Tests** Before: 1 job => ~30 mins After: 2 jobs => ~5 mins <img width="260" alt="Screenshot 2024-03-25 at 15 11 49" src="https://github.com/medusajs/medusa/assets/5105988/e1df6985-5bd6-48d0-b87b-336d3c77d0cf"> **Plugins** Before: 1 job => ~10 mins After: 1 job => ~5 mins <img width="254" alt="Screenshot 2024-03-25 at 15 26 03" src="https://github.com/medusajs/medusa/assets/5105988/c1cec0e2-a1c3-41d1-9372-46d114d804c6"> Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
@medusajs/event-bus-redis
Documentation | Website
An open source composable commerce engine built for developers.
Overview
Redis Event Bus module for Medusa. When installed, the events system of Medusa is powered by BullMQ and io-redis. BullMQ is responsible for the message queue and worker. io-redis is the underlying Redis client, that BullMQ connects to for events storage.
Getting started
Install the module:
yarn add @medusajs/event-bus-redis
Add the module to your medusa-config.js:
module.exports = {
// ...
modules: [
{
resolve: "@medusajs/event-bus-redis",
options: {
redisUrl: "redis:.."
},
},
],
// ...
}
Configuration
The module can be configured with the following options:
| Option | Type | Description | Default |
|---|---|---|---|
redisUrl |
string |
URL of the Redis instance to connect to. | events-worker |
queueName |
string? |
Name of the BullMQ queue. | events-queue |
queueOptions |
object? |
Options for the BullMQ queue. See BullMQ's documentation. | {} |
redisOptions |
object? |
Options for the Redis instance. See io-redis's documentation |
{} |
Info: See how the options are applied in the RedisEventBusService and loader.
If you do not provide a redisUrl in the module options, the server will fail to start.