Adrien de Peretti
8fd1488938
chore: medusa shutdown ( #6865 )
...
* chore: medusa shutdown
* continue
* use shutdown
* on application shutdown
* consume shutdown
* more connection close
* more cleanup
* more cleanup
* update lock
* revert package
* graceful shutdown
* Create yellow-apples-attack.md
* graceful shutdown
* graceful shutdown
---------
Co-authored-by: Sebastian Rindom <skrindom@gmail.com >
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com >
2024-03-29 09:22:29 -03:00
Sebastian Rindom
56481e683d
feat: v2 - add worker mode ( #6739 )
...
**What**
- Adds support for starting a Medusa process with a worker mode.
- The worker modes supported are "shared", "worker", "server"
- In "worker" mode, API routes are not registered and modules that need to run workers (e.g., event bus redis) can use the flag to conditionally start workers.
- In "server" mode, API routes are registered and workers are not started.
- In "shared" mode, API routes are registered and workers are started. This is great for development.
2024-03-21 13:08:20 +00:00
Sebastian Rindom
873c21355c
feat: make it possible to use subscribers in v2 ( #6731 )
2024-03-19 18:31:58 +00:00
Carlos R. L. Rodrigues
884428a1b5
feat: event aggregator ( #6218 )
...
What:
- Event Aggregator Util
- Preparation for normalizing event in a new format (backward compatible with the current format)
- GQL Schema to joiner config and some Entities configured
- Link modules emmiting events
2024-02-05 11:59:10 +00:00
Adrien de Peretti
a45da9215d
fix(medusa, modules-sdk, modules): Module loading missing dependencies + remote query reference issue ( #5468 )
2023-10-26 20:24:38 +02:00
Carlos R. L. Rodrigues
5a8a889c6d
feat(modules-sdk): Remote Query ( #4463 )
...
* feat: Remote Query
2023-07-19 15:35:36 -03:00
Adrien de Peretti
6f1fa244fa
chore(medusa-cli): Cleanup plugin setup ( #4420 )
...
* chore(medusa-cli): Cleanup plugin setup
* fix: logger types
* fix event bus local
* fix event bus redis
* Create late-dragons-collect.md
* move to ts
* remove unused command
* env
* fix
2023-06-28 16:37:25 +02:00
Carlos R. L. Rodrigues
bd12a95083
chore: Initialize method for modules ( #3649 )
...
What:
- Export initialize methods for all modules to be used as a package.
- Export `runMigrations` and `revertMigration` on modules that DB migrations are available
```typescript
import {
initialize as initializeInventory,
InventoryServiceInitializeOptions,
runMigrations as runMigrationsInventory,
} from "@medusajs/inventory";
import { initialize as eventBusInitialize } from "@medusajs/event-bus-redis";
import { initialize as cacheInitialize } from "@medusajs/cache-redis";
const eventBus = await eventBusInitialize({
redisUrl: "localhost",
});
const cache = await cacheInitialize({
redisUrl: "localhost",
});
const options: InventoryServiceInitializeOptions = {
database: {
type: "postgres",
url: `postgres://postgres:@localhost/inventory`,
},
};
await runMigrationsInventory({
options,
});
const inventoryService = await initializeInventory(options, {
eventBusService: eventBus,
});
const sku = "sku_123"
const item = await service.createInventoryItem({
sku,
});
cache.set(sku, { item });
```
2023-03-31 12:09:04 +00:00
Carlos R. L. Rodrigues
4e9d257d3b
Chore(medusa,utils,types,inventory,stock-location): remove core dependency modules ( #3531 )
2023-03-23 08:07:32 -03:00
Oliver Windall Juhl
ef5ef9f5a2
feat(medusa,event-bus-local,event-bus-redis): Event Bus modules ( #2599 )
2023-03-22 10:26:21 +01:00